Example #1
0
    private void SetInitialRow_GrdReqDtls()
    {
        try
        {
            DataTable dt = new DataTable();
            DataRow   dr;
            dt.Columns.Add("ItemId", typeof(int));
            dt.Columns.Add("ItemCode", typeof(string));
            dt.Columns.Add("ItemName", typeof(string));
            dt.Columns.Add("Qty", typeof(Decimal));
            dt.Columns.Add("Rate", typeof(Decimal));
            dt.Columns.Add("SuplierName", typeof(string));
            dt.Columns.Add("Priority", typeof(string));
            dt.Columns.Add("Remark", typeof(string));
            dt.Columns.Add("RemarkFull", typeof(string));
            dr = dt.NewRow();

            dr["ItemId"]      = 0;
            dr["ItemCode"]    = "";
            dr["ItemName"]    = "";
            dr["Qty"]         = 0;
            dr["Rate"]        = 0;
            dr["SuplierName"] = "";
            dr["Priority"]    = "";
            dr["Remark"]      = "";
            dr["RemarkFull"]  = "";
            dt.Rows.Add(dr);

            ViewState["CurrentTablePO"] = dt;
            GrdReqDtls.DataSource       = dt;
            GrdReqDtls.DataBind();
        }
        catch (Exception ex) { throw new Exception(ex.Message); }
    }
Example #2
0
    public void BindPurchaseOrderDetails(Int32 RequisitionCafeId)
    {
        try
        {
            Ds = Obj_ApproveRequisition.GetRequisitionDtls(RequisitionCafeId, out StrError);
            if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0)
            {
                GrdReqDtls.DataSource = Ds.Tables[0];
                GrdReqDtls.DataBind();

                TR_PODtls.Visible = true;
            }
            else
            {
                GrdReqDtls.DataSource = null;
                GrdReqDtls.DataBind();

                TR_PODtls.Visible = false;
            }
        }
        catch (Exception ex) { throw new Exception(ex.Message); }
    }