public void FillPro(string proid, string dat) { try { dt_ = new DataTable(); q = "select ProductID from Products where ProductType = '" + proid + "'"; dt_ = DBConnection.GetQueryData(q); if (dt_.Rows.Count > 0) { proid = dt_.Rows[0]["ProductID"].ToString(); } q = " select * from v_stk where Mstk_dat <= '" + dat + "' and ProductID ='" + proid + "' and returntyp not in ('Defected')"; dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
protected void LinkBtnExportExcel_Click(object sender, EventArgs e) { try { System.Threading.Thread.Sleep(2000); Response.Clear(); Response.Buffer = true; Response.ClearContent(); Response.ClearHeaders(); Response.Charset = ""; string FileName = "StockList.xls"; StringWriter strwritter = new StringWriter(); HtmlTextWriter htmltextwrtter = new HtmlTextWriter(strwritter); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName); GVStk.GridLines = GridLines.Both; GVStk.HeaderStyle.Font.Bold = true; GVStk.RenderControl(htmltextwrtter); Response.Write(strwritter.ToString()); Response.End(); } catch (Exception ex) { throw; //ScriptManager.RegisterStartupScript(this, this.GetType(), "isActive", "Alert();", true); //lblalert.Text = ex.Message; } }
public void FillPro(string proid, string dat) { try { //dt_ = new DataTable(); //q = "select ProductID from Products where ProductType = '" + proid + "'"; //dt_ = DBConnection.GetQueryData(q); //if (dt_.Rows.Count > 0) //{ // proid = dt_.Rows[0]["ProductID"].ToString(); //} q = " select * from v_stockreport where ProductID ='" + proid + "' and returntyp not in ('Defected') and CompanyId = '" + Session["CompanyID"] + "' and BranchId= '" + Session["BranchID"] + "'"; dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillProcat(string protypid) { try { q = " select * from v_stk where ProductType ='" + protypid + "' and returntyp not in ('Defected') and CompanyId = '" + Session["CompanyID"] + "' and BranchId= '" + Session["BranchID"] + "'"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); float GTotal = 0; for (int k = 0; k < GVStk.Rows.Count; k++) { Label total = (Label)GVStk.Rows[k].FindControl("tb_stkval"); GTotal += Convert.ToSingle(total.Text); } lbl_ttlStkVal.Text = GTotal.ToString(); } catch (Exception ex) { throw ex; } }
public void FillProcat(string protypid) { try { q = " select * from v_stockreport where ProductType ='" + protypid + "' and returntyp not in ('Defected') and CompanyId = '" + Session["CompanyID"] + "' and BranchId= '" + Session["BranchID"] + "'"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillProcat(string protypid) { try { q = " select * from v_stk where ProductType ='" + protypid + "' and returntyp not in ('Defected')"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillGrid() { try { q = " select * from v_stockreport where Dstk_unt = '" + Siz + "' and returntyp not in ('Defected') and CompanyId = '" + Session["CompanyID"] + "' and BranchId= '" + Session["BranchID"] + "'"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillGrid(string rej, DateTime date) { try { q = " select * from v_stk where ProductID='" + rej + "' and returntyp='Defected' and dstkdef <> 0 and CompanyId = '" + Session["CompanyID"] + "' and BranchId= '" + Session["BranchID"] + "'"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillGrid() { try { q = " select * from v_stk where Dstk_unt = '" + Siz + "' and returntyp not in ('Defected')"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillGrid() { try { q = " select * from v_stk where Mstk_dat <= '" + dat + "' and returntyp='Defected'"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }
public void FillGrid(string rej, DateTime date) { try { q = " select * from v_stk where Mstk_dat <= '" + date + "' and ProductID='" + rej + "' and returntyp='Defected' and dstkdef <> 0"; dt_ = new DataTable(); dt_ = DBConnection.GetQueryData(q); GVStk.DataSource = dt_; GVStk.DataBind(); } catch (Exception ex) { throw ex; } }