protected void btnget_Click(object sender, EventArgs e) { try { lblmessage.InnerHtml = ""; pnlDetails.Visible = true; docno.InnerHtml = txtdocno.Text.Trim(); // upDetails.Visible = true; txtempc.Visible = true; lblemp.Visible = true; btnPrint.Visible = true; txtremark.Visible = true; DataSet ds6 = new DataSet(); //ds6 = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno"); ds6 = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno", Convert.ToInt32(strFY)); grdconfirm.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno", Convert.ToInt32(strFY)).Tables[0]; grdconfirm.DataBind(); // pnlDetails.Visible = true; grdconfirm.Visible = true; int id = Convert.ToInt32(ds6.Tables[1].Rows[0]["CustID"]); lblempname1.InnerHtml = Convert.ToString(ds6.Tables[1].Rows[0]["FirstName"]) + " " + Convert.ToString(ds6.Tables[1].Rows[0]["LastName"]) + " "; lblcustname.InnerHtml = " " + Convert.ToString(ds6.Tables[1].Rows[0]["CustName"]); lblspinstruction.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["SpInstruction"]); lbldcdate.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["DocumentDate"]); lblorder.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["OrderDate"]); ViewState["EmailID"] = Convert.ToString(ds6.Tables[1].Rows[0]["CUSTEmailID"]); lblemailid.InnerHtml = Convert.ToString(ds6.Tables[1].Rows[0]["CUSTEmailID"]); //strEmailID = Convert.ToString(ds6.Tables[1].Rows[0]["CUSTEmailID"]); DataSet ds7 = G_GetPass.CustEMail_LocalEntry(id); ViewState["SEmailid"] = Convert.ToString(ds7.Tables[0].Rows[0]["SEmailID"]); if (Convert.ToString(ds6.Tables[1].Rows[0]["CUSTEmailID"]) == "") { lblEmailAlert.Visible = true; lblEmailAlert.ForeColor = System.Drawing.Color.Red; lblEmailAlert.Text = "Add email id"; btnEmail.Enabled = false; } else { lblEmailAlert.Visible = false; btnEmail.Enabled = true; } string jv = ""; if (grdconfirm.Rows.Count <= 0) { btnconfirm.Visible = false; jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_PendingDC1_btnconfirm').style.display='none';"; } else { btnconfirm.Visible = true; jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_PendingDC1_btnconfirm').style.display='visible';"; } ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "a", jv, true); } catch { } txtempc.Focus(); }
protected void BindGridview() { DataSet ds = new DataSet(); grdconfirm.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(id), "allbydocno", Convert.ToInt32(strFY)).Tables[0]; grdconfirm.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["d"] != null) { DataSet ds = new DataSet(); ds = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(Request.QueryString["d"].ToString().Trim()), "allbydocno", Convert.ToInt32(Request.QueryString["sd"].ToString().Trim())); DataView dv = new DataView(ds.Tables[0]); DocumentNo.InnerHtml = ds.Tables[0].Rows[0]["DocumentNo"].ToString(); Todaydate.InnerHtml = DateTime.Now.ToString("dd MMM yyyy"); custname.InnerHtml = ds.Tables[1].Rows[0]["CustName1"].ToString(); spnaddress.InnerHtml = ds.Tables[1].Rows[0]["Address"].ToString(); spinstruction.InnerHtml = ds.Tables[1].Rows[0]["SpInstruction"].ToString(); State.InnerHtml = ds.Tables[1].Rows[0]["city"].ToString() + " , " + ds.Tables[1].Rows[0]["State"].ToString(); grdpending.DataSource = dv; grdpending.DataBind(); // grdconfirm.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(Request.QueryString["d"].ToString().Trim()), "allbydocno").Tables[0]; // grdconfirm.DataBind(); } }
protected void btnget_Click(object sender, EventArgs e) { try { lblmessage.InnerHtml = ""; pnlDetails.Visible = true; docno.InnerHtml = txtdocno.Text.Trim(); // upDetails.Visible = true; txtempc.Visible = true; lblemp.Visible = true; btnPrint.Visible = true; txtremark.Visible = true; DataSet ds6 = new DataSet(); //ds6 = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno"); ds6 = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno", Convert.ToInt32(strFY)); grdconfirm.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(txtdocno.Text), "allbydocno", Convert.ToInt32(strFY)).Tables[0]; grdconfirm.DataBind(); // pnlDetails.Visible = true; grdconfirm.Visible = true; lblempname1.InnerHtml = Convert.ToString(ds6.Tables[1].Rows[0][0]) + " " + Convert.ToString(ds6.Tables[1].Rows[0][1]) + " "; lblcustname.InnerHtml = " " + Convert.ToString(ds6.Tables[1].Rows[0][2]); lblspinstruction.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["SpInstruction"]); lbldcdate.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["DocumentDate"]); lblorder.InnerHtml = Convert.ToString(ds6.Tables[0].Rows[0]["OrderDate"]); string jv = ""; if (grdconfirm.Rows.Count <= 0) { btnconfirm.Visible = false; jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_PendingDC1_btnconfirm').style.display='none';"; } else { btnconfirm.Visible = true; jv = "document.getElementById('ctl00_ContentPlaceHolder1_uc_PendingDC1_btnconfirm').style.display='visible';"; } ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "a", jv, true); DDLCustomer.Focus(); } catch { } }
protected void img01_Click(object sender, ImageClickEventArgs e) { ImageButton img = (ImageButton)(sender); if (img.CommandName.ToLower() == "p") { grdconfirm.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(Convert.ToInt32(img.CommandArgument.Trim()), "helpdesk", Convert.ToInt32(0)).Tables[1]; grdconfirm.DataBind(); ModalPopUpDocNum.Show(); UpdatePanel7.Update(); } else { stDS = DCDetails.Get_SubDocId_And_ItsRecords_By_DocNo(Convert.ToInt32(img.CommandArgument.Trim()), "helpdesk", Convert.ToInt32(0)); RepDetailsApprove.DataSource = stDS.Tables[0]; RepDetailsApprove.DataBind(); ModalPopupExtender1.Show(); UpdatePanel8.Update(); } }
protected void BtnGetOrderDetails_Click(object sender, EventArgs e) { Session["tempBookData"] = null; if (txtdocno.Text == "") { message("Please enter Document no."); ClearData(); } else { int DocNum = Convert.ToInt32(txtdocno.Text.ToString()); DataTable dt = new DataTable(); bool condition1 = false; bool condition2 = false; dt = DCMaster.Get_DCMasterBy_DocNum(DocNum, "CancelDC", Convert.ToInt32(strFY)).Tables[0]; // dt = DCDetails.Idv_Get_DCDetails_By_DocNo(DocNum, "Canceled").Tables[0]; if (dt.Rows.Count > 0) { // condition1 = Convert.ToBoolean(dt.Rows[0]["IsConfirm"]); condition2 = Convert.ToBoolean(dt.Rows[0]["IsCanceled"]); Pflag = Convert.ToBoolean(dt.Rows[0]["IsPartialConfirmed"]); } if (condition2 == true) { // dt = DCDetails.Idv_Get_DCDetails_By_DocNo(DocNum, "Canceled").Tables[0]; grdOrderDetails.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(DocNum, "Canceled", Convert.ToInt32(strFY)).Tables[0]; grdOrderDetails.DataBind(); grdOrderDetails.Visible = true; //btncancel.Visible = false; PnlCancel(false); } else { // dt = DCDetails.Idv_Get_DCDetails_By_DocNo(DocNum, "notCanceled").Tables[0]; grdOrderDetails.DataSource = DCDetails.Idv_Get_DCDetails_By_DocNo(DocNum, "notCanceled", Convert.ToInt32(strFY)).Tables[0]; grdOrderDetails.DataBind(); grdOrderDetails.Visible = true; //btncancel.Visible = true; PnlCancel(true); } //else if (dt.Rows.Count == 0) //{ // message("Record not found for document no. " + txtdocno.Text); // btncancel.Visible = false; // txtdocno.Text = ""; // txtdocno.Focus(); // ClearData(); //} // else if (dt.Rows.Count > 0) { Orderdetails.Visible = true; tabledetails.Visible = true; lbldocumentno.Text = dt.Rows[0]["DocumentNo"].ToString(); lblchalanno.Text = dt.Rows[0]["ChallanNo"].ToString(); lblchaldate.Text = dt.Rows[0]["ChallanDate"].ToString(); lblorderno.Text = dt.Rows[0]["OrderNo"].ToString(); //txtsalemanCode.Text = dt.Rows[0]["SalesmanCode"].ToString(); lblsalesman.Text = dt.Rows[0]["SalesmanName"].ToString(); lblcanceldate.Text = dt.Rows[0]["CanceledDate"].ToString(); lbldocdate.Text = dt.Rows[0]["DocumentDate"].ToString(); lblCustomer.Text = dt.Rows[0]["CustName"].ToString(); lblremarked.Text = dt.Rows[0]["CanceledRemark"].ToString(); // lblPersonIncharge.Text = dt.Rows[0]["PIncharge"].ToString(); // lblSpInstruction.Text = dt.Rows[0]["SpInstruction"].ToString(); // lblTransporter.Text = dt.Rows[0]["TransporterCode"].ToString(); // lblBankThrough.Text = dt.Rows[0]["BankName"].ToString(); } } }