ERP渠道文件管理(二十四)

2022-01-15 12:18:52 字數 3912 閱讀 9655

基本需求:

用例圖:

儲存過程:

create procedure [dbo].[bioerpcrmchanneldocument_add]

@documentid int,

@channelid int

as insert into [bioerpcrmchanneldocument](

[documentid],[channelid]

)values(

@documentid,@channelid

)

create procedure bioerpcrmchanneldocument_update

@channeldocumentid int,

@documentid int,

@channelid int,

@deletestate bit

as update [bioerpcrmchanneldocument] set

[documentid] = @documentid,[channelid] = @channelid,[deletestate] = @deletestate

where channeldocumentid=@channeldocumentid

create view dbo.view_crmchanneldocumentinfo

as select dbo.bioerpcrmmanagechannel.channelname, dbo.usermanager.username, dbo.biocrmcorrelationdocument.documentid, dbo.biocrmcorrelationdocument.subject,

dbo.biocrmcorrelationdocument.name, dbo.biocrmcorrelationdocument.type, dbo.biocrmcorrelationdocument.documentlevel,

dbo.biocrmcorrelationdocument.documentsize, dbo.biocrmcorrelationdocument.exetendname, dbo.biocrmcorrelationdocument.[content],

dbo.biocrmcorrelationdocument.userid, dbo.biocrmcorrelationdocument.uploadtime, dbo.biocrmcorrelationdocument.remark,

dbo.bioerpcrmchanneldocument.deletestate, dbo.bioerpcrmchanneldocument.channeldocumentid, dbo.bioerpcrmchanneldocument.channelid

from dbo.bioerpcrmchanneldocument inner join

dbo.biocrmcorrelationdocument on dbo.bioerpcrmchanneldocument.documentid = dbo.biocrmcorrelationdocument.documentid inner join

dbo.usermanager on dbo.biocrmcorrelationdocument.userid = dbo.usermanager.userid inner join

dbo.bioerpcrmmanagechannel on dbo.bioerpcrmchanneldocument.channelid = dbo.bioerpcrmmanagechannel.channelid

bll**:

public  class channeldocumentbll

;return databasehelper.excutesqlreturnint("bioerpcrmchanneldocument_add", commandtype.storedprocedure, pars);

}/// /// 修改文件物件

///

/// 文件物件

/// int

public int bioerpcrmchanneldocumentupdate(bioerpcrmchanneldocument document)

;return databasehelper.excutesqlreturnint("bioerpcrmchanneldocument_update", commandtype.storedprocedure, pars);

}/// /// 根據id查詢文件的詳細資訊

///

///

///

public viewcrmchanneldocumentinfo getchanneldocumentviewbydocumentid(string id);}

reader.close();

return view;}}

前端**:

後端**:

public partial class channeldocumentadd : system.web.ui.page

}protected void btnsubmit_click(object sender, eventargs e)

else}}

}

渠道文件管理顯示介面:

後端**:

public partial class channeldocumentlistshow : system.web.ui.page

if (!ispostback)

}/// /// 查詢所有聯絡人資訊

///

private void getallpagelist()

this.aspnetpager1.recordcount = sqlcomm.getdatacountbycondition("dbo.view_crmchanneldocumentinfo", condition);

this.aspnetpager1.pagesize = pagesize;

this.gridview1.datasource = sqlcomm.getdatabypageindex("dbo.view_crmchanneldocumentinfo", "*", "documentid", condition, pageindex, pagesize);

this.gridview1.databind();

}protected void aspnetpager1_pagechanged(object sender, eventargs e)

protected void imgbutnsearch_click(object sender, imageclickeventargs e)

if (this.txtcname.text.trim() != null && this.txtcname.text.trim().length != 0)

if (this.txtdate.text.trim() != null && this.txtdate.text.trim().length!=0)

getallpagelist();

}protected void btnnew_click(object sender, eventargs e)

protected void imgbtnnew_click(object sender, imageclickeventargs e)

}

二十四點演算法

給出四個數,不可以重複使用,可以用 和括號,怎麼得出24?return 1 表示當前方法不行 private int workbystep int op,int num1,int num2 else if op 1 else if op 2 else if op 3 只要沒有有小數生成,即使有負數也...

演算法二十四 矩形

給定兩個矩陣,判斷第二個矩陣在第乙個矩陣的哪些位置出現過。輸入的第一行包含四個正整數a,b,c,d,表示第乙個矩陣大小為a b,第二個矩陣的大小為c d。接下來是乙個a b的矩陣。再接下來是乙個c d的矩陣。保證矩陣中每個數字都為正整數且不超過100。若第二個矩陣在第乙個矩陣的 i,j 位置出現 即...

二十四點演算法

package com.onezero 計算24遊戲 給出四張1到13之間的整數,通過 組合成合法表示式並使結果等於24 如給出1 3 4 6,可以組合乘6 1 3 4 演算法仍然是窮舉法,不過刪除了一些重複的式子。為了精確表示除法結果,這裡實現有理數類。基本思想 先在四張牌中選出兩張,有6種,再計...