private void LoadRecord() { long iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["id"], Session.SessionID)); ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix(); ProductUnitsMatrixDetails clsDetails = clsUnitMatrix.Details(iID); lblBaseUnitID.Text = clsDetails.BaseUnitID.ToString(); txtBaseUnit.Text = Convert.ToString(clsDetails.BaseUnitName); txtBaseUnitValue.Text = clsDetails.BaseUnitValue.ToString(); // cboBottomUnit.Items.RemoveAt( cboBottomUnit.Items.IndexOf(cboBottomUnit.Items.FindByValue(lblBaseUnitID.Text))); cboBottomUnit.SelectedIndex = cboBottomUnit.Items.IndexOf(cboBottomUnit.Items.FindByValue(clsDetails.BottomUnitID.ToString())); txtBottomUnitValue.Text = clsDetails.BottomUnitValue.ToString(); clsUnitMatrix.CommitAndDispose(); }
private void LoadRecord() { long iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["id"],Session.SessionID)); ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix(); ProductUnitsMatrixDetails clsDetails = clsUnitMatrix.Details(iID); lblBaseUnitID.Text = clsDetails.BaseUnitID.ToString(); txtBaseUnit.Text = Convert.ToString(clsDetails.BaseUnitName); txtBaseUnitValue.Text = clsDetails.BaseUnitValue.ToString(); // cboBottomUnit.Items.RemoveAt( cboBottomUnit.Items.IndexOf(cboBottomUnit.Items.FindByValue(lblBaseUnitID.Text))); cboBottomUnit.SelectedIndex = cboBottomUnit.Items.IndexOf(cboBottomUnit.Items.FindByValue(clsDetails.BottomUnitID.ToString())); txtBottomUnitValue.Text = clsDetails.BottomUnitValue.ToString(); clsUnitMatrix.CommitAndDispose(); }