康宁津园综合运营管理平台-物业管理子系统v1.0代码_第1页
康宁津园综合运营管理平台-物业管理子系统v1.0代码_第2页
康宁津园综合运营管理平台-物业管理子系统v1.0代码_第3页
康宁津园综合运营管理平台-物业管理子系统v1.0代码_第4页
康宁津园综合运营管理平台-物业管理子系统v1.0代码_第5页
已阅读5页,还剩59页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

工程保养计划usingusingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingAspNet=System.Web.UI.WebControls;usingKNJYDataServer;usingFineUI;usingSystem.Data;usingKNJY.YY.Serve;usingSystem.Text;usingSystem.IO;usingnamespace{publicpartialclassProjectMainterancePlan:{DataTableA=newDataTable();#regionViewPower//////publicoverridestring{{}}

returnprivatestringTableName="VIEWUNIVERSITYCOURSE";#regionPage_Loadprotectedvoid der,EventArgs{{DateTime Convert.ToDateTime(GetQueryIntValue2("DateTimedtLast= ,}catch(Exception{}}protectedvoidPage_Load(objecder,EventArgs{{if{DateTimedt=DateTimedtLast= ,}}catch(Exception{}}privatevoidInitGrid(DateTimedt,DateTime{{stringsystemId=GetQueryIntValue2("systemId");string_type=(GetQueryIntValue2("type"));string_DEVICENAMEID=string_Year=(GetQueryIntValue2("year"));DateTimedt=dt;inti=FineUI.BoundFieldbf=newFineUI.BoundField();FineUI.BoundFieldbf2=newFineUI.BoundField();FineUI.TemplateFieldtf;bf.DataField="ID";bf.DataFormatString="{0}";bf.HeaderTextID";bf.Hidden=true;bf2.DataField="Name";bf2.DataFormatString"{0}";bf2.HeaderText="设备位置";while(dt<={List<int>c=newList<int>();tf=newFineUI.TemplateField();tf.ID=string.Format("W"+dt.ToString("yyyyMMdd"),tf.ColumnID=string.Format("W"+dt.ToString("yyyyMMdd"),Type.GetType("System.String"));tf.HeaderTexti+"-"+tf.Width=tf.ItemTemplate=newMyTemplate("W"+dt=dt.AddDays(7);}}catch(Exception{}}/////////<param///<paramprivatevoidHelpList(string_key,refList<int>{string[]_arr=for(inti=0;i<_arr.Count();{switch{casecasecasecasecase}}}//////数据废//////<param///privateDataTableLoaddataFormWcf(string{#regionDataTabledTable=newDataTable();dTable.Columns.Add("ID",Type.GetType("System.String"));dTable.Columns.Add("Name",Type.GetType("System.String"));string_DEVICEID=(GetQueryIntValue2("DEVICEID"));stringsystemId=GetQueryIntValue2("systemId");Select<VIEWDEVICE>s=newSelect<VIEWDEVICE>("VIEWDEVICE",s.Where("DEVICESYSTEMID",OrderAndTypeEnum.stringType,

s.Where("DEVICESTATUS",OrderAndTypeEnum.stringType,"==","QueryResults<VIEWDEVICE>qr=s.Execute();foreach(VIEWDEVICE_VIEWDEVICEin{if(_VIEWDEVICE.DEVICEID=={DataRowdr=dTable.NewRow();dr["ID"]=_VIEWDEVICE.DEVICEID;dr["Name"]=_VIEWDEVICE.DEVICENAME;}}return}privatevoidLoadData(DateTimedt,DateTime{{stringp=(GetQueryIntValue2("type"));string_DEVICENAMEID=DateTimedt=dt;#regiondTableDataTabledTable=newDataTable();DataTabledtUpdate=newDataTable();DataRowdTable.Columns.Add("ID",Type.GetType("System.String"));while(dt<={dTable.Columns.Add("W"+dt.ToString("yyyyMMdd"),dt=}DataRowstringsystemId=GetQueryIntValue2("systemId");Select<VIEWDEVICE>sDevice=newSelect<VIEWDEVICE>("VIEWDEVICE",OrderAndTypeEnum.stringType,"==",p);OrderAndTypeEnum.stringType,"==",_DEVICENAMEID);OrderAndTypeEnum.stringType,"==","可用");QueryResults<VIEWDEVICE>qrDevice=sDevice.Execute();foreach(VIEWDEVICEiteminqrDevice.Result){dr=dTable.NewRow();dr["ID"]=item.DEVICEID;dr["Name"]=}Select<VIEWDEVICEREPAIRWEEK>s=newSelect<VIEWDEVICEREPAIRWEEK>("VIEWDEVICEREPAIRWEEK",s.Where("DEVICESYSTEMID","==",

s.Where("STARTDATE",OrderAndTypeEnum.stringType,">=",dt.ToString("yyyy-MM-dd")+"s.Where("STARTDATE",OrderAndTypeEnum.stringType,"<=",dtLast.ToString("yyyy-MM-dd")+"00:00:00");QueryResults<VIEWDEVICEREPAIRWEEK>qr=s.Execute();foreach(VIEWDEVICEREPAIRWEEKiteminqr.Result){+if(drs.Length>{

dr=dr["ID"]=dr["W"+item.STARTDATE.ToString("yyyyMMdd")]drUpdate=dtUpdate.NewRow();drUpdate["ID"]=item.DEVICEID;drUpdate["STARTDATE"]=}}Grid1.DataSource=dTable;hdUpdate.Text=}catch(Exception{}}protectedvoidGrid1_RowDataBound(objecder,FineUI.GridRowEventArgse){{

stringvalue=DataRowViewrow=e.DataItemasDataRowView;for(inti=2;i<Grid1.Columns.Count;{value=row[Grid1.Columns[i].ID].ToString();if(!value.Equals("")){AspNet.CheckBoxListcbl=foreach(AspNet.ListItemitemin{item.Selected=}}}}catch(Exception{}}#region/////////<param///<paramprotectedvoidbtnSave_Click(objecder,EventArgs{{DateTime Convert.ToDateTime(GetQueryIntValue2("DateTimedtLast=DataTableif{dtUpdate=}{dtUpdate=newDataTable();}AspNet.CheckBoxListcbl;AspNet.TemplateFieldfor(inti=0;i<Grid1.Rows.Count;{GridRowrow=Grid1.Rows[i];DateTimedt=dt;{while(dt<={stringa=string.Format("W"+dt.ToString("yyyyMMdd"),Type.GetType("System.String"));cbl=stringValuesdr=foreach(AspNet.ListItemitemin{if(item.Selected=={if(Valuesdr=={Valuesdr=}{

Valuesdr=Valuesdr+"|"}}}#region{DataErrorde=DataError.NoError;{

DEVICEREPAIRWEEKitems=items.DEVICEID=row.Values[0];items.STARTDATE=(dt);items.OVERDATE=dt.AddDays(6);items.RITEM=Valuesdr;items.RYEAR=dt.Year.ToString()items.RMONTH=dt.ToString("MM")+items.RSEASON=HelpRseAson(dt.AddMonths(0-(dt.Month-1)%3).AddDays(1if(dtUpdate.Select("ID='"+items.DEVICEID+"'andSTARTDATE='"+dt.ToString("yyyyMMdd")+"'").Length>0){deDataMessageyze.GetCallResult(_SqlEdit.SQlEdit(items,false, }elseif{de=DataMessageyze.GetCallResult(_SqlEdit.SQlEdit(items,true, }switch{caseDataError.NoError:caseDataError.Unique:}}catch(Exception{}}dt=}}}}catch(Exception{}}/////////<param///privateboolCheckSaveAs(DEVICEREPAIRWEEK{string_DEVICEID=items.DEVICEID;Select<DEVICEREPAIRWEEK>_DEVICEREPAIRWEEK=newSelect<DEVICEREPAIRWEEK>("DEVICEREPAIRWEEK",OrderAndTypeEnum.stringType,"==",_DEVICEREPAIRWEEK.Where("RYEAR",OrderAndTypeEnum.stringType,OrderAndTypeEnum.stringType,"==",OrderAndTypeEnum.stringType,"==",items.RMONTH);QueryResults<DEVICEREPAIRWEEK>Q_DEVICEREPAIRWEEK=if{return}{return}}/////////<param///privatestringHelpRseAson(string{switch{casereturncasereturncasereturncasereturncasereturncasereturncasereturncasereturncasereturncasereturncasereturncasereturn"4";default:return"Erro";}}/////////<param///<paramprotectedvoidUseEnd_Click(objecder,EventArgs{{if{btnSave.Enabled=}{btnSave.Enabled=}}catch(Exception{}}/////////<param///<paramprotectedvoidExcelUse_Click(objecder,EventArgs{{Response.AddHeader("content-disposition","attaent;Response.ContentType="application/excel";Response.ContentEncoding=System.Text.Encoding.UTF8;}catch(Exception{}}///html//////<param///privatestringGetGridTableHtml(Grid{StringBuildersb=newsb.Append("<tablecellspacing=\"0\"rules=\"all\"border=\"1\"style=\"border-collapse:collapse;\">");foreach(GridColumncolumnin{sb.AppendFormat("<tdbackground-color:#CCCCCC;font-size:16px;text-align:center;vertical-:middle>{0}</td>",column.HeaderText)}sb.Append("</tr>");//foreach(GridRowrowin{foreach(objectvaluein{stringhtml=value.ToString();{stringtemplateID=ControltemplateCtrl=html=}{

if(html.Contains("box-grid-static-{if{html=}{html=}}if{stringprefix=Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath,"");html=html.Replace("src=\"","src=\""}}sb.AppendFormat("<td>{0}</td>",//sb.AppendFormat("{0}",}}return}/////////<param///publicstringGetRenderedHtmlSource(Control{if(ctrl!={using(StringWritersw=new{using(HtmlTextWriterhtw=new{return}}}return}publicoverridevoidVerifyRenderingInServerForm(Control{}privateDataTable{#regionstatementinti=1;intj=1;AspNet.CheckBoxListcbl;DateTimedt= DateTimedtLast=stringsystemId=GetQueryIntValue2("systemId");string_type=(GetQueryIntValue2("type"));string_DEVICEID=(GetQueryIntValue2("DEVICEID"));string_Year=(GetQueryIntValue2("year"));string_DEVICENAME=(GetQueryIntValue2("DEVICENAME"));DateTimedt=dt DateTimedt2= DateTimedt3= DataTabledTable=newwhile(dt<={string_textNameidt.ToString("MMdd")"-"+dt.AddDays(6).ToString("MMdd");dt=dt.AddDays(7);}Dictionary<string,Dictionary<string,string>>_a=newDictionary<string,Dictionary<string,string>>();Dictionary<string,string>_b=new

Select<DEVICEREPAIRWEEK>_DEVICEREPAIRWEEK=newSelect<DEVICEREPAIRWEEK>("DEVICEREPAIRWEEK",OrderAndTypeEnum.stringType,"==",_DEVICEREPAIRWEEK.Where("RYEAR",OrderAndTypeEnum.stringType,"like","%"+_Year+"%");QueryResults<DEVICEREPAIRWEEK>Q_DEVICEREPAIRWEEKforeach(DEVICEREPAIRWEEK_DEVICEREPAIRWEEK2in{_b.Add("W"}_a.Add(_DEVICEID,_b);DataRowdrdTable.NewRow();dr["ID"]=_DEVICEID;dr["设备名称"]=for(intk=0;k<Grid1.Rows.Count;{GridRowrow=Grid1.Rows[k];while(dt2<=dtLast){stringa=string.Format("W"+dt2.ToString("yyyyMMdd"),Type.GetType("System.String"));cbl=(AspNet.CheckBoxList)row.FindControl(a);stringValuesdr="";foreach(AspNet.ListItemitemin{if(item.Selected=={if(Valuesdr=={Valuesdr=}{Valuesdr=Valuesdr+"|"+}}}string_namejdt2.ToString("MMdd")"-"+dt2.AddDays(6).ToString("MMdd");if{dr[_name]=}{dr[_name]}dt2=dt2.AddDays(7);}}returndTable;}privatestringHelpDatil(string{stringstring[]_arr=Valuesdr.Split('|');for(inti=0;i<_arr.Count();i++){switch{caseif(_Valuesdr=={_Valuesdr}{_Valuesdr=_Valuesdr+"|"}case"M":if(_Valuesdr=={_Valuesdr}{_Valuesdr=_Valuesdr+"|"}case"Q":if(_Valuesdr=={_Valuesdr}{_Valuesdr=_Valuesdr+"|"}case"A":if(_Valuesdr=={_Valuesdr}{_Valuesdr=_Valuesdr+"|"}case"Y":if(_Valuesdr=={_Valuesdr}{_Valuesdr=_Valuesdr+"|"}}}return}privatestringGetGridTableHtml2(Grid{DateTimedtLast=DateTimedt=intj=AspNet.CheckBoxListcbl;DateTimedt2=dt;StringBuildersb=newsb.Append("<tablecellspacing=\"0\"rules=\"all\"border=\"1\"style=\"border-collapse:collapse;\">");foreach(GridColumncolumnin{sb.AppendFormat("<tdbackground-color:#CCCCCC;font-size:16px;text-align:center;vertical-:middle>{0}</td>",column.HeaderText)}sb.Append("</tr>");//for(intk=0;k<Grid1.Rows.Count;{GridRowrow=Grid1.Rows[k];while(dt2<=dtLast){stringa=string.Format("W"+dt2.ToString("yyyyMMdd"),Type.GetType("System.String"));cbl=(AspNet.CheckBoxList)row.FindControl(a);stringValuesdr="";foreach(AspNet.ListItemitemin{if(item.Selected=={if(Valuesdr=={Valuesdr=}{Valuesdr=Valuesdr+"|"+}}}if{}{sb.AppendFormat("<td>{0}</td>}dt2=dt2.AddDays(7);}}return}}}usingusingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Data.Entity;usingusingEntityFramework.Extensions;usingKNJYDataServer;usingnamespace{publicpartialclassDevicespareparts:{#region/////////publicoverridestring{{}}

returnstring_TableName="VIEWDEVICESPAREPARTS";#regionPage_LoadprotectedvoidPage_Load(objecder,EventArgs{if{}}privatevoid{stringtype=//CheckPowerWithButton("CoreTitleNew",//ResolveDeleteButtonFrid(btnDeleteSelected,Grid1);btnNew.OnClientClick=btnNew2.OnClientClick=//Grid1.PageSize=ConfigHelper.PageSize;ddlGridPageSize.SelectedValue=Grid1.PageSize.ToString();}privatevoid{{Select<VIEWDEVICESPAREPARTS>a1=Select<VIEWDEVICESPAREPARTS>(_TableName,

stringsearchText=ttbSearessage.Text.Trim();if(!String.IsNullOrEmpty(searchText)){a1.Where("BILLNO",OrderAndTypeEnum.stringType,"like","%"+searchText+"%");}highlightRows.Text="";Grid1.RecordCount=result.Acount;Grid1.DataSource=result.Result;}catch(Exception{}}#regionEventsprotectedvoidttbSearessage_Trigger2Click(objecder,EventArgse){ttbSearessage.ShowTrigger1=true;}protectedvoidGrid1_PreRowDataBound(objecder,GridPreRowEventArgse){}protectedvoidttbSearessage_Trigger1Click(objecder,EventArgse){ essage.Text=String.Empty; essage.ShowTrigger1=false;}protectedvoidGrid1_PreDataBound(objecder,EventArgs{//CheckPowerWithWindowField("CoreTitleEdit",Grid1,CheckPowerWithLinkButtonField("CoreTitleDelete",Grid1,}protectedvoidGrid1_Sort(objecder,GridSortEventArgs{//Grid1.SortDirection=//Grid1.SortColumnIndex=e.ColumnIndex;}protectedvoidGrid1_PageIndexChange(objecder,GridPageEventArgse){Grid1.PageIndex=e.NegeIndex;}protectedvoid mandEventArgse){}protectedvoidWindow1_Close(objecder,EventArgs{}EventArgse){Grid1.PageSize=}}}usingusingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Data.Entity;usingusingEntityFramework.Extensions;usingKNJYDataServer;usingnamespace{publicpartialclassDeviceSpareParts_edit:{privatestringTableName="DeviceSpareParts";#regionViewPower/////////publicoverridestring{{}}

return#regionPage_LoadprotectedvoidPage_Load(objecder,EventArgs{if{}}privatevoid{{stringid=GetQueryIntValue2("id");stringtype=GetQueryIntValue2("type");Select<DICTIONARY>sr1=new OrderAndTypeEnum.decimalType,"==",OrderAndTypeEnum.stringType,"==","00000000000000000031");QueryResults<DICTIONARY>qrr1=sr1.Execute();List<DICTIONARY>lr1=qrr1.Result;foreach(DICTIONARYrin{}DEVICESPAREPARTSdevice=newif(id!={Select<DEVICESPAREPARTS>snewSelect<DEVICESPAREPARTS>(TableName,s.Where("BILLID",OrderAndTypeEnum.stringType,

QueryResults<DEVICESPAREPARTS>qr=s.Execute();List<DEVICESPAREPARTS>l=qr.Result;foreach(DEVICESPAREPARTScurrentin{device=tbxno.Text=current.BILLNO;dpbilldate.Text=current.BILLDATE.ToString("yyyy-MM-tpbilltime.Text=tbxhander.Text=dllbillstatus.SelectedValue=tbxmeno.Text=hfData.Text=}//foreach(ACTIVEITEMcurrentin dllServeIDID.SelectedValue= current.ActiveItemName= nbapmaxNo.Text=}//Grid1.PageSize=//ddlGridPageSize.SelectedValue=}catch(Exception{}}privatevoidBindGrid(string{{Select<VIEWDEVICESPAREPARTSDETAIL>s=QueryResults<VIEWDEVICESPAREPARTSDETAIL>qr=Grid1.RecordCount=Grid1.PageSize=//ddlGridPageSize.SelectedValue=Grid1.DataSource=qr.Result;hfDatas.Text=}catch(Exception{}}#regionEventsprotectedvoidbtnSaveClose_Click(objecder,EventArgs{{if(Grid1.Rows.Count=={Alert.Show("}{stringid=GetQueryIntValue2("id");stringtype=GetQueryIntValue2("type");DataErrorde=DataError.NoError;VIEWSYSUSERvs=DEVICESPAREPARTSdevice=newdevice.BILLTYPE=Convert.ToInt16(type);device.DEVICESYSTEMID="01";if{device=}device.BILLNO=device.BILLSTATUS=device.BILLDATE=

device.HANDER=tbxhander.Text.Trim();device.BILLMEMO=tbxmeno.Text.Trim();List<DEVICESPAREPARTSDETAIL>items=getList();if(String.IsNullOrEmpty(id)){device.REGISERID=device.REGISERTIME=DateTime.Now;DataEditResuer=DataMessageyze.GetCallEditResult(_SqlEdit.SQlEdit(device,true,TableName,EnumDBType.Serve));id=}{device.BILLID=id;device.UPDATERID=device.UPDATETIME=DateTime.Now;de=DataMessageyze.GetCallResult(_SqlEdit.SQlEdit(device,false,TableName,EnumDBType.Serve));}foreach(DEVICESPAREPARTSDETAILitemin{item.BILLID=if(item.DETAILID!={_SqlEdit.SQlEdit(item,false,"DEVICESPAREPARTSDETAIL",EnumDBType.Serve);}{_SqlEdit.SQlEdit(item,true,"DEVICESPAREPARTSDETAIL",EnumDBType.Serve);}}}}catch(Exception{}}privateDateTimetimetype(stringa,string{DateTimec3=Convert.ToDateTime(a);DateTimec4=DateTimec5=Convert.ToDateTime(c3.Date+c4.TimeOfDay);returnc5;}protectedvoidbta_Click(objecder,EventArgs{{decimalvalue=stringtype=GetQueryIntValue2("type");if(dlldevicename.Text.Equals(null)){Alert.Show("}{Select<VIEWDEVICESPAREPARTSSTOCK>s=news.Where("DEVICENAMEID",OrderAndTypeEnum.stringType,"==",dlldevicename.SelectedValue);s.Where("DEVICEMODEL","==",QueryResults<VIEWDEVICESPAREPARTSSTOCK>qr

List<VIEWDEVICESPAREPARTSSTOCK>l=foreach(VIEWDEVICESPAREPARTSSTOCKcurrentin{value=Convert.ToDecimal(current.STOC}stringid2=GetQueryIntValue2("id2");List<DEVICESPAREPARTSDETAIL>items=getList();DEVICESPAREPARTSDETAILitem=new"-

{Alert.ShowInTop("}{item.DEVICENAMEID=dlldevicename.SelectedValue;item.DEVICENAME=dlldevicename.SelectedText;item.AMOUNT=item.DEVICEMODEL=tbxmodel.Text.Trim();item.DETAILMEMO=tbxdetailmemo.Text.Trim();stringid=GetQueryIntValue2("id");item.BILLID=id;if(items.FindIndex(o=>o.DEVICENAMEID==item.DEVICENAMEID)==-1){}{Alert.ShowInTop("相同设备不能重复添加}}}}catch(Exception{}}privaist<DEVICESPAREPARTSDETAIL>getList(){List<DEVICESPAREPARTSDETAIL>result;if{result=}elseresult=new}return}privatevoidGridBind(List<DEVICESPAREPARTSDETAIL>{{}

hfDatas.Text=JsonConvert.SerializeObject(items);Grid1.DataSource=items;catch(Exception{}}protectedvoidbtnDeleteSelected_Click(objecder,EventArgs{}protectedvoidGrid1_PreDataBound(objecder,EventArgs{//CheckPowerWithWindowField("CoreTitleEdit",Grid1,CheckPowerWithLinkButtonField("CoreTitleDelete",Grid1,}protectedvoidGrid1_Sort(objecder,GridSortEventArgs{//Grid1.SortDirection=//Grid1.SortColumnIndex=}protectedvoidGrid1_PageIndexChange(objecder,GridPageEventArgse){Grid1.PageIndex=e.Ne}protectedvoid mandEventArgse){if mandName=={List<DEVICESPAREPARTSDETAIL>items=getList();if(items.Count>e.RowIndex){}//items=newList<DEVICESPAREPARTSDETAIL>();Alert.ShowInTop("}}protectedvoidWindow1_Close(objecder,EventArgs{}EventArgse){//Grid1.PageSize=}//privatevoidGridToActiveItemList(Gridgrid,List<DEVICESPAREPARTSDETAIL>items) for(inti=0;i<grid.Rows.Count; DEVICESPAREPARTSDETAILitem=new if(grid.DataKeys[i][0]!= item.DETAILID= if(grid.DataKeys[i][1]!= item.BILLID= item.DEVICENAMEID= item.DEVICENAME= item.DEVICEMODEL= item.AMOUNT= item.DETAILMEMO= }}usingusingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Data.Entity;usingusingEntityFramework.Extensions;usingKNJYDataServer;usingnamespace{publicpartialclassDeviceSpareparts_edits:{privatestringTableName="DeviceSpareParts";#regionViewPower/////////publicoverridestring{{}}

return#regionprotectedvoidPage_Load(objecder,EventArgs{if{}}privatevoid{{

stringid=GetQueryIntValue2("id");stringtype=GetQueryIntValue2("type");Select<DICTIONARY>sr1=new OrderAndTypeEnum.decimalType,"==",OrderAndTypeEnum.stringType,"==","00000000000000000031");QueryResults<DICTIONARY>qrr1=sr1.Execute();List<DICTIONARY>lr1=qrr1.Result;foreach(DICTIONARYrin{}DEVICESPAREPARTSdevice=newif(id!={Select<DEVICESPAREPARTS>snewSelect<DEVICESPAREPARTS>(TableName,s.Where("BILLID",OrderAndTypeEnum.stringType,

QueryResults<DEVICESPAREPARTS>qr=s.Execute();List<DEVICESPAREPARTS>l=qr.Result;foreach(DEVICESPAREPARTScurrentin{device=tbxno.Text=current.BILLNO;dpbilldate.Text=current.BILLDATE.ToString("yyyy-MM-tpbilltime.Text=tbxhander.Text=current.HANDER;dllbillstatus.SelectedValue=tbxmeno.Text=hfData.Text=}//foreach(ACTIVEITEMcurrentin dllServeIDID.SelectedValue= current.ActiveItemName= nbapmaxNo.Text=}//Grid1.PageSize=//ddlGridPageSize.SelectedValue=}catch(Exception{}}privatevoidBindGrid(string{{Select<VIEWDEVICESPAREPARTSDETAIL>s=QueryResults<VIEWDEVICESPAREPARTSDETAIL>qr=

Grid1.RecordCount=qr.Acount;Grid1.PageSize=ConfigHelper.PageSize;//ddlGridPageSize.SelectedValueGrid1.DataSource=qr.Result;hfDatas.Text=}catch(Exception{}}#regionEventsprotectedvoidbtnSaveClose_Click(objecder,EventArgs{{if(Grid1.Rows.Count=={Alert.Show("}{stringid=stringtype=GetQueryIntValue2("type");DataErrorde=DataError.NoError;VIEWSYSUSERvs=DEVICESPAREPARTSdevice=newdevice.BILLTYPE=Convert.ToInt16(type);device.DEVICESYSTEMID="01";if{device=}//active.SERVEGDID=dllservegdid.SelectedValue;device.BILLNO=tbxno.Text.Trim();device.BILLSTATUS=device.BILLDATE=

device.HANDER=tbxhander.Text.Trim();device.BILLMEMO=//active.APPLYOVERTIME//active.APPLYMAXNUMBER=//device.DEPARTMENTID=//List<DEVICESPAREPARTSDETAIL>items=new//GridToActiveItemList(Grid1,items);List<DEVICESPAREPARTSDETAIL>items=getList();//device.ACTIVEITEM=items;if{device.REGISERID=device.REGISERTIME=DateTime.Now;DataEditResuer=DataMessageyze.GetCallEditResult(_SqlEdit.SQlEdit(device,true,TableName,EnumDBType.Serve));}{

id=//id=device.BILLID=id;device.UPDATERID=device.UPDATETIME=DateTime.Now;de=DataMessageyze.GetCallResult(_SqlEdit.SQlEdit(device,false,TableName,EnumDBType.Serve));}foreach(DEVICESPAREPARTSDETAILitemin{item.BILLID=if(item.DETAILID!={_SqlEdit.SQlEdit(item,false,"DEVICESPAREPARTSDETAIL",EnumDBType.Serve);}{_SqlEdit.SQlEdit(item,true,"DEVICESPAREPARTSDETAIL",EnumDBType.Serve);}}//FineUI.Alert.Show("保存成功!String.Empty,}}catch(Exception{}}privateDateTimetimetype(stringa,string{DateTimec3=Convert.ToDateTime(a);DateTimec4=DateTimec5=Convert.ToDateTime(c3.Date+c4.TimeOfDay);returnc5;}protectedvoidbta_Click(objecder,EventArgs{{if{Alert.Show("}{stringid2=GetQueryIntValue2("id2");List<DEVICESPAREPARTSDETAIL>items=getList();//GridToActiveItemList(Grid1,items);DEVICESPAREPARTSDETAILitem=newitem.DEVICENAMEID=dlldevicename.SelectedValue;item.DEVICENAME=dlldevicename.SelectedText;item.AMOUNT=item.DEVICEMODEL=tbxmodel.Text.Trim();item.DETAILMEMO=tbxdetailmemo.Text.Trim();stringid=GetQueryIntValue2("id");item.BILLID=id;if(items.FindIndex(o=>o.DEVICENAMEID==item.DEVICENAMEID)==-1){}{}

Alert.ShowInTop("相同设备不能重复添加}}catch(Exception{}}privaist<DEVICESPAREPARTSDETAIL>{List<DEVICESPAREPARTSDETAIL>if{result=}{result=new}return}privatevoidGridBind(List<DEVICESPAREPARTSDETAIL>{{

hfDatas.Text=JsonConvert.SerializeObject(items);Grid1.DataSource=items;}catch(Exception{}}protectedvoidbtnDeleteSelected_Click(objecder,EventArgs{}protectedvoidGrid1_PreDataBound(objecder,EventArgs{//CheckPowerWithWindowField("CoreTitleEdit",Grid1,CheckPowerWithLinkButtonField("CoreTitleDelete",Grid1,}protectedvoidGrid1_Sort(objecder,GridSortEventArgs{//Grid1.SortDirection=//Grid1.SortColumnIndex=}protectedvoidGrid1_PageIndexChange(objecder,GridPageEventArgse){Grid1.PageIndex=e.Ne}protectedvoid mandEventArgse){if mandName=={List<DEVICESPAREPARTSDETAIL>items=getList();if(items.Count>e.RowIndex){}//items=newList<DEVICESPAREPARTSDETAIL>();Alert.ShowInTop("}}protectedvoidWindow1_Close(objecder,EventArgs{}EventArgse){//Grid1.PageSize=}}}usingusingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Data.Entity;usingusingEntityFramework.Extensions;usingKNJYDataServer;usingnamespace{publicpartialclassDeviceSparePartsStock:{#region/////////publicoverridestring{{}}

returnstring_TableName="VIEWDEVICESPAREPARTSSTOCK";#regionPage_LoadprotectedvoidPage_Load(objecder,EventArgs{if{}}privatevoid{//Grid1.PageSize=ConfigHelper.PageSize;ddlGridPageSize.SelectedValue=Grid1.PageSize.ToString();}privatevoid{{Select<VIEWDEVICESPAREPARTSSTOCK>a1=Select<VIEWDEVICESPAREPARTSSTOCK>(_TableName,

stringsearchText=ttbSearessage.Text.Trim();if(!String.IsNullOrEmpty(searchText)){a1.Where("DEVICENAME",OrderAndTypeEnum.stringType,"like","%"+searchText+"%");}}

QueryResults<VIEWDEVICESPAREPARTSSTOCK>result=highlightRows.Text="";Grid1.RecordCount=result.Acount;Grid1.DataSource=result.Result;catch(Exception{}}#regionEventsprotectedvoidttbSearessage_Trigger2Click(objecder,EventArgse){ttbSearessage.ShowTrigger1=true;}protectedvoidGrid1_PreRowDataBound(objecder,GridPreRowEventArgse){}protectedvoidttbSearessage_Trigger1Click(objecder,EventArgse){ essage.Text=String.Empty; essage.ShowTrigger1=false;}protectedvoidGrid1_PreDataBound(objecder,EventArgs{//CheckPowerWithWindowField("CoreTitleEdit",Grid1,CheckPowerWithLinkButtonField("CoreTitleDelete",Grid1,}protectedvoidGrid1_Sort(objecder,GridSortEventArgs{//Grid1.SortDirection=//Grid1.SortColumnIndex=e.ColumnIndex;}protectedvoidGrid1_PageIndexChange(objecder,GridPageEventArgse){Grid1.PageIndex=e.NegeIndex;}protectedvoid mandEventArgse){}protectedvoidWindow1_Close(objecder,EventArgs{}EventArgse){Grid1.PageSize=}}}usingusingSystem.Collections.Generic;usingSystem.Web;usingusingSystem.Web.UI.WebControls;usingFineUI;usingusingusingEntityFramework.Extensions;usingKNJYDataServer;namespace{publicpartialclassEnergy:{#regionstring_TableName=/////////publicoverridestring{{}}

return#regionPageLoadprotectedvoidPage_Load(objecder,EventArgs{if{}}privatevoid{//CheckPowerWithButton("CoreTitleView",//ResolveDeleteButtonFrid(btnDeleteSelected,Grid1);stringcid=GetQueryIntValue2("CLA");btnNew.OnClientClick=Window1.GetShowReference("~/Project/Energy_edit.aspx?CLA="+cid,新增能源表信息Grid1.PageSize=ConfigHelper.PageSize;ddlGridPageSize.SelectedValue=Grid1.PageSize.ToString();}privatevoid{{stringid= Select<VIEWENERGYMETER>sr1new ",OrderAndTypeEnum.decimalType,"==",}

sr1.Sort(Grid1,OrderAndTypeEnum.stringType);QueryResults<VIEWENERGYMETER>result=sr1.Execute();Grid1.RecordCount=result.Acount;Grid1.DataSource=result.Result;catch(Exception{}}#regionEventsprotectedvoidWindow1_Close(objecder,EventArgs{}protectedvoidGrid1_Sort(objecder,GridSortEventArgs{//Grid1.SortDirection=//Grid1.SortColumnIndex=e.ColumnIndex;}protectedvoidGrid1_PageIndexChange(objecder,GridPageEventArgse){Grid1.PageIndex=e.NegeIndex;}EventArgse){Grid1.PageSize=}}}usingusingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Data.Entity;usingusingKNJYDataServer;usingnamespace{publicpartialclassEnergy_edit{#regionstringTableName=/////////publicoverridestring{{}}

return#regionPage_LoadprotectedvoidPage_Load(objecder,EventArgs{if{}}privatevoid{{stringid=GetQueryIntValue2("id");Select<ENERGYMETERAREA>srnewSelect<ENERGYMETERAREA>("ENERGYMETERAREA",

QueryResulERGYMETERAREA>qrr=sr.Execute();List<ENERGYMETERAREA>lr=qrr.Result;foreach(ENERGYMETERAREArin{ddlmeterareatype.Items.Add(r.AREANAME,}if(id!={Select<ENERGYMETER>snewSelect<ENERGYMETER>(TableName,

QueryResulERGYMETER>qr=s.Execute();List<ENERGYMETER>items=qr.Result;foreach(ENERGYMETERiteminitems){tbxmeternno.Text=item.METERNO;tbxmeterplace.Text=item.METERPLACE;ddlenergyStauts.SelectedValue=ddlmeterareatype.SelectedValue=tbxmeterrange.Text=item.METERRANGE;tbxmetername.Text=item.METERNAME;hfData.Text=}}}catch(Exception{}}#regionEventsprotectedvoidbtnSaveClose_Click(objecder,EventArgs{{stringid=GetQueryIntValue2("id");stringID=GetQueryIntValue2("CLA");DataErrorde=DataError.NoError;ENERGYMETERitem=newENERGYMETER();if{item}item.METERNO=tbxmeternno.Text.Trim();item.METERNAME=tbxmetername.Text.Trim();item.METERAREATYPE=ddlmeterareatype.SelectedValue;item.METERPLACE=tbxmeterplace.Text.Trim();item.ENERGYSTATUS=item.METERRANGE=tbxmeterrange.Text.Trim();VIEWSYSUSERvs=if{item.ENERGYCLA=ID;item.REGISERID=vs.EMPLOYEEID;item.REGISERTIME=DateTime.Now;de=DataMessageyze.GetCallResult(_SqlEdit.SQlEdit(item,true,TableName,}{item.METERID=id;item.UPDATERID=item.UPDATETIME=DateTime.Now;de=}if(de=={FineUI.Alert.Show("保存成功!String.Empty,}}catch(Exception{}}}}usingusingSystem.Collections.Generic;using

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论