public void loadFromCostingPanel(int smvId) { int buyerIdForLoad = 0; try { SmvBLL smvBll = new SmvBLL(); DataTable dt = smvBll.LoadCostingInfoInfoForUpdate(smvId); { buyerNameDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["BuyerId"]); buyerIdForLoad = Convert.ToInt32(dt.Rows[0]["BuyerId"]); string value = Convert.ToString(dt.Rows[0]["SampleStageId"]); sampleStageHiddenField.Value = value; loadSampleStageForUpdate(buyerIdForLoad); sampleStageDropDownList.SelectedValue = sampleStageHiddenField.Value; fabricDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["FabricId"]); //styleDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["StyleId"]); styleNumberTextBox.Text = Convert.ToString(dt.Rows[0]["StyleNumber"]); styleDescriptionTextBox.Text = Convert.ToString(dt.Rows[0]["StyleDescription"]); ProductDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ProductCategoryId"]); valueAddedSmvHiddenField.Value = Convert.ToString(dt.Rows[0]["SmvId"]); //SeasonDropDownList.SelectedValue= Convert.ToString(dt.Rows[0]["SeasonId"]); seasonTextBox.Text = Convert.ToString(dt.Rows[0]["SeasonId"]); } } catch (Exception ex) { } }
public void LoadSmvInfoForUpdate(int smvId) { int buyerIdForLoad = 0; try { SmvBLL smvBll = new SmvBLL(); DataTable dt = smvBll.LoadCostingInfoInfoForUpdate(smvId); if (dt.Rows.Count > 0) { buyerNameDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["BuyerId"]); buyerIdForLoad = Convert.ToInt32(dt.Rows[0]["BuyerId"]); string value = Convert.ToString(dt.Rows[0]["SampleStageId"]); sampleStageHiddenField.Value = value; loadSampleStageForUpdate(buyerIdForLoad); sampleStageDropDownList.SelectedValue = sampleStageHiddenField.Value; fabricDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["FabricId"]); styleDescriptionTextBox.Text = Convert.ToString(dt.Rows[0]["StyleDescription"]); styleNumberTextBox.Text = Convert.ToString(dt.Rows[0]["StyleNumber"]); designTextBox.Text = Convert.ToString(dt.Rows[0]["DesignNumber"]); ProductDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ProductCategoryId"]); //SeasonDropDownList.SelectedValue= Convert.ToString(dt.Rows[0]["SeasonId"]); seasonTextBox.Text = Convert.ToString(dt.Rows[0]["SeasonId"]); DateTime date = Convert.ToDateTime(dt.Rows[0]["SampleDate"]); if (date.ToString("yyyy-MM-dd") == "1900-01-01") { sampleDateTextBox.Text = ""; } else { sampleDateTextBox.Text = date.ToString("yyyy-MM-dd"); } sewingTextBox.Text = Convert.ToString(dt.Rows[0]["SwingSmv"]); pleatingTextBox.Text = Convert.ToString(dt.Rows[0]["PleatingSmv"]); permanentCreaseTextBox.Text = Convert.ToString(dt.Rows[0]["PermanentCrease"]); supperCreaseTextBox.Text = Convert.ToString(dt.Rows[0]["SupperCrease"]); heatSealTextBox.Text = Convert.ToString(dt.Rows[0]["HeatSealHeatSmv"]); overlayTextBox.Text = Convert.ToString(dt.Rows[0]["OverlayFilmHeatSmv"]); plkTextBox.Text = Convert.ToString(dt.Rows[0]["PLKQuiltingSmv"]); autoTextBox.Text = Convert.ToString(dt.Rows[0]["AutoQuiltingSmv"]); quiltingManualTextBox.Text = Convert.ToString(dt.Rows[0]["ManualQuiltingSmv"]); downManualTextBox.Text = Convert.ToString(dt.Rows[0]["ManualDownFill"]); downMachineTextBox.Text = Convert.ToString(dt.Rows[0]["MachineDownFill"]); seamTextBox.Text = Convert.ToString(dt.Rows[0]["SeamSeal"]); bondingTextBox.Text = Convert.ToString(dt.Rows[0]["Bonding"]); cuttingTextBox.Text = Convert.ToString(dt.Rows[0]["CuttingSMV"]); finisingTextBox.Text = Convert.ToString(dt.Rows[0]["FinisingSmv"]); otherDescriptionTextBox.Text = Convert.ToString(dt.Rows[0]["OthersDescription"]); otherValueTextBox.Text = Convert.ToString(dt.Rows[0]["OthersValue"]); //optionDescriptionTextBox.Text = Convert.ToString(dt.Rows[0]["OptionDescription"]); //optionValueTextBox.Text = Convert.ToString(dt.Rows[0]["OptionValue"]); //optionNumberTextBox.Text = Convert.ToString(dt.Rows[0]["OptionNumber"]); //optionRemarksTextBox.Text = Convert.ToString(dt.Rows[0]["OptionRemarks"]); //optionAdditionalTextBox.Text = Convert.ToString(dt.Rows[0]["OptionAdditionalValuee"]); machineDetailsTextarea.InnerText = Convert.ToString(dt.Rows[0]["MachineWork"]); descriptionTextarea.InnerText = Convert.ToString(dt.Rows[0]["Remarks"]); approvedDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ApprovedBy"]); reviewDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ReviewBy"]); } } catch (Exception ex) { } }