Exemple #1
0
        private void Get_locationWisePartData(string StrItemCode, string strLocationCode, ref string strLocationQty)
        {
            double  DStockLoc = 0.0;
            DataSet ds2       = new DataSet();

            try
            {
                ds2            = SysFunc.PartStockAtLoaction(StrItemCode, Session["DealerCode"].ToString(), strLocationCode);
                DStockLoc      = Convert.ToDouble(ds2.Tables[0].Rows[0]["Balance"]);
                strLocationQty = Convert.ToString(DStockLoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
        private void DisplayItem()
        {
            DataSet ds = new DataSet();

            try
            {
                SqlParameter[] param =
                {
                    new SqlParameter("@DealerCode", SqlDbType.Char),
                    new SqlParameter("@ItemCode",   SqlDbType.Char),
                    new SqlParameter("@IssueNo",    SqlDbType.Char)
                };
                param[0].Value = Session["DealerCode"].ToString();
                param[1].Value = ddlPartsNo.SelectedValue.ToString();
                param[2].Value = ddlIssueNo.SelectedValue.ToString();
                ds             = SysFunc.FillDataSet("sp_StockReturn_Part_Select", param);

                txtPartItemDesc.Text = ds.Tables[0].Rows[0]["ItemDesc"].ToString();
                txtPartItemNo.Text   = ds.Tables[0].Rows[0]["PartItemNo"].ToString();
                txtLocCode.Text      = ds.Tables[0].Rows[0]["PartsTransLocCode"].ToString();
                txtLocDesc.Text      = ds.Tables[0].Rows[0]["PartsTransLocDesc"].ToString();
                txtUnitCode.Text     = ds.Tables[0].Rows[0]["UnitCode"].ToString();
                txtUnit.Text         = ds.Tables[0].Rows[0]["UnitDesc"].ToString();
                txtIssueQty.Text     = ds.Tables[0].Rows[0]["IssueQty"].ToString();
                txtIssueRate.Text    = ds.Tables[0].Rows[0]["Rate"].ToString();
                txtRemaining.Text    = (Convert.ToDouble(txtIssueQty.Text) - Convert.ToDouble(ds.Tables[0].Rows[0]["RetQty"].ToString())).ToString();


                ds = SysFunc.PartStock(ddlPartsNo.SelectedValue.ToString().Trim(), Session["DealerCode"].ToString(), txtLocCode.Text);
                txtTotalStock.Text = ds.Tables[0].Rows[0]["Balance"].ToString();
                ds = SysFunc.PartStockAtLoaction(ddlPartsNo.SelectedValue.ToString().Trim(), Session["DealerCode"].ToString(), txtLocCode.Text);
                txtStockLoc.Text = ds.Tables[0].Rows[0]["Balance"].ToString();
            }
            catch (Exception ex)
            {
                LbErr.Text = ex.Message;
            }
        }