예제 #1
0
    protected void txtlRequestNo_TextChanged(object sender, EventArgs e)
    {
        if (txtlRequestNo.Text != "")
        {
            DataTable dt = new DataView(ObjPurchaseReqestHeader.GetPurchaseRequestHeaderTrueAll(StrCompId.ToString(), StrBrandId.ToString(), StrLocationId.ToString()), "RequestNo='" + txtlRequestNo.Text.Trim() + "'", "", DataViewRowState.CurrentRows).ToTable();
            if (dt.Rows.Count != 0)
            {
                if (Convert.ToBoolean(dt.Rows[0]["IsActive"].ToString()))
                {
                    DisplayMessage("Request No Already Exists");
                }
                else
                {
                    DisplayMessage("Request No Already Exists :- Go To Bin Tab");
                }


                txtlRequestNo.Text = "";
                txtlRequestNo.Focus();
            }
            else
            {
                btnAddProduct.Focus();
            }
        }
    }
예제 #2
0
    public void FillRequestGrid()
    {
        DataTable dt = new DataView(ObjInvPurchaseRequest.GetPurchaseRequestHeaderTrueAll(StrCompId, StrBrandId, strLocationId), "DepartmentApproval='False'", "", DataViewRowState.CurrentRows).ToTable();

        gvPurchaseRequest.DataSource = dt;
        gvPurchaseRequest.DataBind();
        lblTotalRecords.Text = Resources.Attendance.Total_Records__0 + dt.Rows.Count;
        Session["DtRecord"]  = dt;
        Session["dtFilter"]  = dt;
        AllPageCode();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     strCompId     = Session["CompId"].ToString();
     strBrandId    = "1";
     strLocationId = "1";
     if (Request.QueryString["RId"] != null)
     {
         try
         {
             string Id = new DataView(InvPr.GetPurchaseRequestHeaderTrueAll(Session["CompId"].ToString(), strBrandId.ToString(), strLocationId.ToString()), "RequestNo='" + Request.QueryString["RId"].ToString() + "'", "", DataViewRowState.CurrentRows).ToTable().Rows[0]["Trans_Id"].ToString();
             fillRequest(Id.ToString());
         }
         catch
         {
         }
     }
 }