// //////////////////////////////////////////////////////////////////////// // PUBLIC METHODS // /// <summary> /// LoadByWorkId /// </summary> /// <param name="workId">workId</param> /// <param name="companyId">companyId</param> public void LoadByWorkId(int workId, int companyId) { PointRepairsSectionDetailsGateway pointRepairsSectionDetailsGateway = new PointRepairsSectionDetailsGateway(Data); pointRepairsSectionDetailsGateway.LoadByWorkId(workId, companyId); // Update some fields before to show UpdateFieldsForSections(); }
protected void grdLiningPlan_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { int workId = Int32.Parse(((HiddenField)e.Row.FindControl("hdfWorkID")).Value); int companyId = Int32.Parse(hdfCompanyId.Value); PointRepairsSectionDetailsGateway pointRepairsSectionDetailsGateway = new PointRepairsSectionDetailsGateway(); pointRepairsSectionDetailsGateway.LoadByWorkId(workId, companyId); string usmh = pointRepairsSectionDetailsGateway.GetUsmhDescription(workId); string dsmh = pointRepairsSectionDetailsGateway.GetDsmhDescription(workId); DropDownList ddlVideoMN = (DropDownList)e.Row.FindControl("ddlVideoMN"); DropDownList ddlLinerMN = (DropDownList)e.Row.FindControl("ddlLinerMN"); ddlVideoMN.Items.Add(""); ddlVideoMN.Items.Add(usmh); ddlVideoMN.Items.Add(dsmh); try { ddlVideoMN.SelectedValue = ((HiddenField)e.Row.FindControl("hdfVideoMN")).Value; } catch { ddlVideoMN.SelectedIndex = 0; } ddlLinerMN.Items.Add(""); ddlLinerMN.Items.Add(usmh); ddlLinerMN.Items.Add(dsmh); try { ddlLinerMN.SelectedValue = ((HiddenField)e.Row.FindControl("hdfLinerMN")).Value; } catch { ddlLinerMN.SelectedIndex = 0; } } }