Beispiel #1
0
    private void SetInitialRow_GRDPOPUPFOREDIT()
    {
        try
        {
            DataTable dt = new DataTable();
            DataRow   dr;
            dt.Columns.Add("RequestId", typeof(int));
            dt.Columns.Add("RequestNo", typeof(string));
            dt.Columns.Add("RequestDate", typeof(string));
            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("Emp", typeof(string));
            dt.Columns.Add("Priority", typeof(string));
            dt.Columns.Add("Remark", typeof(string));
            dt.Columns.Add("Location", typeof(string));
            dt.Columns.Add("RemarkFull", typeof(string));
            dt.Columns.Add("RemarkAuth", typeof(string));
            dr = dt.NewRow();

            dr["RequestId"]   = 0;
            dr["RequestNo"]   = "";
            dr["RequestDate"] = "";
            dr["ItemId"]      = 0;
            dr["ItemCode"]    = "";
            dr["ItemName"]    = "";
            dr["Qty"]         = 0;
            dr["Rate"]        = 0;
            dr["Emp"]         = "";
            dr["Priority"]    = "";
            dr["Remark"]      = "";
            dr["RemarkFull"]  = "";
            dr["Location"]    = "";
            dr["RemarkAuth"]  = "";
            dt.Rows.Add(dr);

            ViewState["CurrentTablePO"] = dt;
            GRDPOPUPFOREDIT.DataSource  = dt;
            GRDPOPUPFOREDIT.DataBind();
        }
        catch (Exception ex) { throw new Exception(ex.Message); }
    }
Beispiel #2
0
 public void BindPurchaseOrderDetailsFORPOPUP(Int32 RequisitionCafeId)
 {
     try
     {
         Ds = Obj_ApproveRequisition.GetRequisitionDtls(RequisitionCafeId, out StrError);
         if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0)
         {
             GRDPOPUPFOREDIT.DataSource = Ds.Tables[0];
             GRDPOPUPFOREDIT.DataBind();
             TxtRemarkAl.Text = Ds.Tables[0].Rows[0]["RemarkFromAuthorise"].ToString();
         }
         else
         {
             GRDPOPUPFOREDIT.DataSource = null;
             GRDPOPUPFOREDIT.DataBind();
             TxtRemarkAl.Text = string.Empty;
         }
     }
     catch (Exception ex) { throw new Exception(ex.Message); }
 }