protected void GenerateParameterUji(object sender, EventArgs e) { //List<GridParameter> checkedparam = new List<GridParameter>(); if (CmbJenisAnalisa.SelectedIndex != 0 && CmbSubKomoditas.SelectedIndex != 0) { var ret = pcc.GetParameterUji(CmbSubKomoditas.SelectedValue, CmbJenisAnalisa.SelectedValue); var datas = ret.Result; //foreach (var data in datas) //{ // checkedparam.Add(new GridParameter // { // ischecked = "1", // }); //} GvParameter.DataSource = datas; GvParameter.DataBind(); UpdateJumlahContoh(); CalculateTotal(null, null); LitJmlParameterUji.Text = datas.Count().ToString(); } else { GvParameter.DataSource = null; GvParameter.DataBind(); LitTotalBiaya.Text = "0"; LitJmlParameterUji.Text = "0"; } }
private void GvData_RowCommand(object sender, GridViewCommandEventArgs e) { var NoBalitTanah = e.CommandArgument.ToString(); switch (e.CommandName) { case "DetailorderList": OrderListControls orderControls = new OrderListControls(); var listOrderAnalystDetail = orderControls.GetParameter(NoBalitTanah); var data = listOrderAnalystDetail.Result; DivRow7.Visible = true; DivRow8.Visible = true; DivRow1.Visible = false; DivRow2.Visible = false; DivRow3.Visible = false; DivRow4.Visible = false; DivRow5.Visible = false; DivRow6.Visible = false; GvParameter.DataSource = data.ToList(); GvParameter.DataBind(); if (GvParameter.Rows.Count > 0) { GvParameter.UseAccessibleHeader = true; GvParameter.HeaderRow.TableSection = TableRowSection.TableHeader; } break; } }
private void GvData_RowCommand(object sender, GridViewCommandEventArgs e) { var NoBalitTanah = e.CommandArgument.ToString(); switch (e.CommandName) { case "DetailorderList": OrderListControls orderControls = new OrderListControls(); var ret = orderControls.GetParameter(NoBalitTanah); var data = ret.Result; DivRow6.Visible = true; DivRow7.Visible = true; DivRow1.Visible = false; DivRow2.Visible = false; DivRow3.Visible = false; DivRow4.Visible = false; DivRow5.Visible = false; GvParameter.DataSource = data.ToList(); GvParameter.DataBind(); break; } }
private void GvData3_RowCommand(object sender, GridViewCommandEventArgs e) { var NoBalitTanah = e.CommandArgument.ToString(); switch (e.CommandName) { case "DetailorderList": OrderListControls orderControls = new OrderListControls(); var ret = orderControls.GetParameter(NoBalitTanah); var data = ret.Result; DivRow9.Visible = true; DivRow8.Visible = true; DivRow7.Visible = true; DivRow1.Visible = false; DivRow2.Visible = false; DivRow3.Visible = false; DivRow4.Visible = false; //DivRow5.Visible = false; DivRow6.Visible = false; using (var db = new smlpobDB()) { orderNo = Request.QueryString["orderNo"]; var headerInfo = (from x in db.ordersampletbls where x.orderNo == orderNo select x).FirstOrDefault(); if (headerInfo != null) { TxtNoSample.Text = headerInfo.sampleCode; TxtNoBalitTanah.Text = headerInfo.noBalittanah; TxtDesa.Text = headerInfo.village; TxtKecamatan.Text = headerInfo.subDistrict; TxtKabupaten.Text = headerInfo.district; TxtPropinsi.Text = headerInfo.province; TxtGps.Text = headerInfo.latitude + "," + headerInfo.longitude; TxtTipeTanah.Text = headerInfo.landUse; } } GvParameter.DataSource = data.ToList(); GvParameter.DataBind(); if (GvParameter.Rows.Count > 0) { GvParameter.UseAccessibleHeader = true; GvParameter.HeaderRow.TableSection = TableRowSection.TableHeader; } //Response.Redirect("DaftarService.aspx?orderNo=" + IDS); break; } }
protected void GenerateParameterUji(object sender, EventArgs e) { if (txtJenisAnalisis.SelectedIndex != 0 && txtKomoditasChild.SelectedIndex != 0) { var ret = pcc.GetParameterUji(txtKomoditasChild.SelectedValue, txtJenisAnalisis.SelectedValue); var datas = ret.Result; GvParameter.DataSource = datas; GvParameter.DataBind(); } }
void LoadParameter(string orderNo) { var ret3 = orderanalysisControls.GetData(orderNo); var filteredData = from x in ret3.Result select new { x.elementId, x.elementservicestbl.elementCode }; var dataParameter = filteredData.Distinct(); GvParameter.DataSource = dataParameter; GvParameter.DataBind(); if (GvParameter.Rows.Count > 0) { GvParameter.UseAccessibleHeader = true; GvParameter.HeaderRow.TableSection = TableRowSection.TableHeader; } }
void LoadDetail() { //Detail var ret = orderControls.DetailData(_orderno); var dataSample = ret.Result; //get PIC var myLab = CommonWeb.GetUserLab(); var ret2 = employeecontrols.GetDataAnalis(myLab); var dataPIC = ret2.Result; // var ret3 = orderanalysisControls.GetData(_orderno); var dataParameter = ret3.Result; if (dataPIC != null && dataPIC.Count() > 0) { DdlPIC.DataSource = dataPIC; DdlPIC.DataTextField = "employeeName"; DdlPIC.DataValueField = "employeeNo"; DdlPIC.DataBind(); } if (dataParameter != null && dataParameter.Count() > 0) { GvParameter.DataSource = dataParameter; GvParameter.DataBind(); } if (dataSample != null) { lblcusname.Text = dataSample.customertbl.customerName; lblKomoditi.Text = dataSample.comoditytbl.comodityName; lblanalisis.Text = dataSample.analysisType; lblSampel.Text = dataSample.sampleTotal.ToString(); lblTotalHarga.Text = "Rp " + dataSample.priceTotal?.ToString("n2"); } }