private void GetPrint() { string BookCode = txtbook.Text.Split(':')[0].ToString(); string from; string To; from = "04/01/2014"; To = "04/01/2014"; DateTime FromDate = Convert.ToDateTime(from); DateTime ToDate = Convert.ToDateTime(To); DataSet ds = Other_Z.OtherBAL.C_IDV_Chetana_REP_STOCK_Get(DDLCnf.SelectedValue.ToString(), FromDate, ToDate, Convert.ToInt32(Session["FY"]), BookCode, "CNFBook"); if (ds.Tables[0].Rows.Count > 0) { ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("~/Report/BookStockReport.rpt")); rd.SetDataSource(ds.Tables[0]); rd.SetParameterValue("CNF", DDLCnf.SelectedItem.Text); rd.SetParameterValue("Book", txtbook.Text); BookStokeReport.ReportSource = rd; } else { MessageBox("Record not found"); DDLCnf.Focus(); return; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["ChetanaCompanyName"] != null) { if (Session["FY"] != null) { strChetanaCompanyName = Session["ChetanaCompanyName"].ToString(); strFY = Session["FY"].ToString(); if (!IsPostBack) { GetSuperZone(); DDLCnf.Focus(); } } else { Session.Clear(); } } else { Session.Clear(); } if (Page.IsPostBack) { if (DDLCnf.SelectedValue.ToString() != "0" && txtbook.Text != "") { GetPrint(); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["FY"] != null) { FY = Session["FY"].ToString(); btnconfirm.Visible = false; } else { Session.Clear(); } if (!Page.IsPostBack) { GetValidation(4, Convert.ToInt32(Session["Role"])); docno.InnerHtml = "Not Selected"; btnPrint.Visible = false; btnDocWice.Visible = false; pnlDetails.Visible = false; GetSuperZone(); DDLCnf.Focus(); } }
public void BindPanel() { DataTable dt = ObjDal.C_GetPendingDocNo(Convert.ToInt32(FY), DDLCnf.SelectedValue.ToString()).Tables[0]; if (dt.Rows.Count > 0) { //Rptrpending.Visible = true; pnlconfirm.Visible = true; upOrderNO.Visible = true; pnlDetails.Visible = false; Rptrpending.DataSource = dt; Rptrpending.DataBind(); } else { MessageBox("There is no pending DC for this CnF "); pnlconfirm.Visible = false; pnlDetails.Visible = false; DDLCnf.Focus(); return; } //pnlDetails.Visible = false; }
public void GetSuperZone() { DDLCnf.DataSource = BindCnFGrid("ddlCnF", 0).Tables[0]; DDLCnf.DataBind(); DDLCnf.Items.Insert(0, new ListItem("-- Select CnF --", "0")); }