private void GetHireRecord(V_HireRecord Vrecord) { this.txelectricitypay.Text = Vrecord.HouseRecordObj.ELECTRICITY.ToString(); this.txtelectricitynum.Text = Vrecord.HouseRecordObj.ELECTRICITYNUM.ToString(); this.txtFloor.Text = Vrecord.houseInfoObj.FLOOR.ToString(); this.txtHouseName.Text = Vrecord.houseInfoObj.HOUSENAME; this.txtManageCost.Text = Vrecord.HouseRecordObj.MANAGECOST.ToString(); this.txtUptown.Text = Vrecord.houseInfoObj.UPTOWN; this.txtwater.Text = Vrecord.HouseRecordObj.WATER.ToString(); this.txtwaternum.Text = Vrecord.HouseRecordObj.WATERNUM.ToString(); this.txtother.Text = Vrecord.HouseRecordObj.OTHERCOST.ToString(); this.SharedRentCost.Text = Vrecord.HouseRecordObj.RENTCOST.ToString(); this.sDate.SelectedDate = Vrecord.houseAppObj.STARTDATE; this.eDate.SelectedDate = Vrecord.houseAppObj.ENDDATE; this.payDate.SelectedDate = Vrecord.HouseRecordObj.SETTLEMENTDATE; this.txtNum.Text = Vrecord.houseInfoObj.ROOMCODE; if (Vrecord.HouseRecordObj.SETTLEMENTTYPE == "0") { this.txtpaytype.Text = Utility.GetResourceStr("WAGE"); } else { this.txtpaytype.Text = Utility.GetResourceStr("CASH"); } if (Vrecord.houseAppObj.RENTTYPE == "0") { this.txtRentType.Text = Utility.GetResourceStr("SHAREDHIRE"); } else { this.txtRentType.Text = Utility.GetResourceStr("WHOLEHIRE"); } }
void dgHireApp_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Hirerecord = (V_HireRecord)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
/// <summary> /// 2010-5-20 by liujx /// </summary> /// <param name="action">动作 增、删、改、查、审核</param> /// <param name="hireAppID">申请ID</param> /// <param name="checkState">状态</param> /// <param name="FromFlag">来源标记</param> public HireRecordForm(Action action, V_HireRecord VRecord) { InitializeComponent(); houseInfo = new T_OA_HOUSEINFO(); hireRecordList = new V_HireRecord(); this.action = action; hireRecordList = VRecord; hireRecord = new T_OA_HIRERECORD(); hireRecord = VRecord.HouseRecordObj; InitEvent(); SetToolBar(); if (action == Action.Return) { SetReturnBar(); } GetHireRecord(VRecord); }