protected void LoadInfo(int Key) { ProcessPlant_Info info = new ProcessPlant_Info(Key); if (Key != 0) { DDLSeed.SelectedValue = info.SeedsKey.ToString(); DDLType.SelectedValue = info.ProcessPlant_Type.ToString(); txtName.Text = info.ProcessPlantName; txtDescription.Text = info.Description; } }
protected void SaveInfo() { SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"]; ProcessPlant_Info info = new ProcessPlant_Info(txtKey.Text.ToInt()); info.SeedsKey = DDLSeed.SelectedValue.ToInt(); info.ProcessPlant_Type = DDLType.SelectedValue.ToInt(); info.ProcessPlantName = txtName.Text; info.Description = txtDescription.Text; info.Cooperative_Key = Session["CooperativeKey"].ToInt(); if (txtKey.Text.ToInt() != 0) { info.ModifiedBy = new Guid(nUserLogin.Key); info.ModifiedDateTime = DateTime.Now; } else { info.CreatedBy = new Guid(nUserLogin.Key); info.CreatedDateTime = DateTime.Now; } info.Save(); }
public void LoadData() { int nPageNumber = int.Parse(txtPageNumber.Text); int nPageSize = int.Parse(txtPageSize.Text); SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"]; DataTable nTable = ProcessPlantDetail_Data.GetList(nPageSize, nPageNumber, txtSearch.Text, _key); if (_key != 0) { ProcessPlant_Info info = new ProcessPlant_Info(_key); Session["ProcessPlant_Type"] = info.ProcessPlant_Type; } if (nTable.Rows.Count == 0) { nTable.Rows.Add(0, 0, "", 0); } nTable.Columns.Add(); GV_List.DataSource = nTable; GV_List.DataBind(); DateTime dt = DateTime.Now; LoadPages(); }