Пример #1
0
 public void bindfollowupdata()
 {
     try
     {
         DataTable dtcontact = new DataTable();
         dtcontact = bal.getFollowupdatabal(Convert.ToInt32(lblcomno.Text));
         if (dtcontact.Rows.Count > 0)
         {
             grdfollowup.DataSource = dtcontact;
             grdfollowup.DataBind();
             grdfollowup.UseAccessibleHeader    = true;
             grdfollowup.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             grdfollowup.DataSource = dtcontact;
             grdfollowup.DataBind();
             grdfollowup.UseAccessibleHeader    = true;
             grdfollowup.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
     }
     catch (Exception ex)
     {
         Getconnection.SiteErrorInsert(ex);
     }
 }
Пример #2
0
 public void bindDetail()
 {
     try
     {
         //  dt = bal.getallItemsubgroupBAL(lblloginid.Text);
         dt = bal.getallItemsubgroupforadminBAL();
         if (dt.Rows.Count > 0)
         {
             grddata.DataSource = dt;
             grddata.DataBind();
             grddata.UseAccessibleHeader    = true;
             grddata.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             grddata.DataSource = dt;
             grddata.DataBind();
             grddata.UseAccessibleHeader    = true;
             grddata.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
     }
     catch (Exception ex)
     {
         Getconnection.SiteErrorInsert(ex);
     }
 }
Пример #3
0
    public void binditemgroup()
    {
        try
        {
            DataTable dtdept = new DataTable();


            dtdept = bal.getallitemgroupfroadminBAL();
            if (dtdept.Rows.Count > 0)
            {
                ddlgroup.DataSource     = dtdept;
                ddlgroup.DataTextField  = "ItemGroup";
                ddlgroup.DataValueField = "Id";
                ddlgroup.DataBind();


                dlgroupnamemp.DataSource     = dtdept;
                dlgroupnamemp.DataTextField  = "ItemGroup";
                dlgroupnamemp.DataValueField = "Id";
                dlgroupnamemp.DataBind();
            }
            ddlgroup.Items.Insert(0, new ListItem("----Select ItemGroup----", "0"));
            dlgroupnamemp.Items.Insert(0, new ListItem("----Select ItemGroup----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #4
0
    public void bindDetail()
    {
        try
        {
            if (lblrole.Text.Equals("admin"))
            {
                dt = bal.getallOrderdataforadminBAL();
            }
            else
            {
                dt = bal.getallOrderdataBAL();
            }



            if (dt.Rows.Count > 0)
            {
                grddata.DataSource = dt;
                grddata.DataBind();
                grddata.UseAccessibleHeader    = true;
                grddata.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
            else
            {
                grddata.DataSource = dt;
                grddata.DataBind();
                grddata.UseAccessibleHeader    = true;
                grddata.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #5
0
 public void binditemdata()
 {
     try
     {
         DataTable dtcontact = new DataTable();
         dtcontact = bal.getallquotationitemdatabal(lblqno.Text);
         if (dtcontact.Rows.Count > 0)
         {
             grdproduct.DataSource = dtcontact;
             grdproduct.DataBind();
             grdproduct.UseAccessibleHeader    = true;
             grdproduct.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             grdproduct.DataSource = dtcontact;
             grdproduct.DataBind();
             grdproduct.UseAccessibleHeader    = true;
             grdproduct.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
     }
     catch (Exception ex)
     {
         Getconnection.SiteErrorInsert(ex);
     }
 }
Пример #6
0
 public void binddocument()
 {
     try
     {
         DataTable dtcontact = new DataTable();
         dtcontact = bal.getdocumentadataBAL(lblloginid.Text, Convert.ToInt32(lblcomno.Text));
         if (dtcontact.Rows.Count > 0)
         {
             grddocument.DataSource = dtcontact;
             grddocument.DataBind();
             grddocument.UseAccessibleHeader    = true;
             grddocument.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             grddocument.DataSource = dtcontact;
             grddocument.DataBind();
             grddocument.UseAccessibleHeader    = true;
             grddocument.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
     }
     catch (Exception ex)
     {
         Getconnection.SiteErrorInsert(ex);
     }
 }
Пример #7
0
    public void bindstatus()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getallstatusfroadminBAL();
            if (dtbtype.Rows.Count > 0)
            {
                dpstatus.DataSource     = dtbtype;
                dpstatus.DataTextField  = "Status";
                dpstatus.DataValueField = "id";
                dpstatus.DataBind();


                dpfollowstatus.DataSource     = dtbtype;
                dpfollowstatus.DataTextField  = "Status";
                dpfollowstatus.DataValueField = "id";
                dpfollowstatus.DataBind();
            }
            dpstatus.Items.Insert(0, new ListItem("----Select Status----", "0"));
            dpfollowstatus.Items.Insert(0, new ListItem("----Select Status----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #8
0
    public void bindDetail()
    {
        try
        {
            dt = bll.getallstatusfroadminBAL();


            if (dt.Rows.Count > 0)
            {
                grddata.DataSource = dt;
                grddata.DataBind();
                grddata.UseAccessibleHeader    = true;
                grddata.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
            else
            {
                grddata.DataSource = dt;
                grddata.DataBind();
                grddata.UseAccessibleHeader    = true;
                grddata.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #9
0
 public void binditemdata()
 {
     try
     {
         DataTable dtcontact = new DataTable();
         dtcontact = bal.getInqiuryDetailsdataBAL(Convert.ToInt32(lblcomno.Text));
         if (dtcontact.Rows.Count > 0)
         {
             grdproduct.DataSource = dtcontact;
             grdproduct.DataBind();
             grdproduct.UseAccessibleHeader    = true;
             grdproduct.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             grdproduct.DataSource = dtcontact;
             grdproduct.DataBind();
             grdproduct.UseAccessibleHeader    = true;
             grdproduct.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
     }
     catch (Exception ex)
     {
         Getconnection.SiteErrorInsert(ex);
     }
 }
Пример #10
0
    public void BindDetail()
    {
        try
        {
            DataTable dt = bal.getalltermsandconditionsfroadminBAL();


            if (dt.Rows.Count > 0)
            {
                grddata1.DataSource = dt;
                grddata1.DataBind();
                grddata1.UseAccessibleHeader    = true;
                grddata1.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
            else
            {
                grddata1.DataSource = dt;
                grddata1.DataBind();
                grddata1.UseAccessibleHeader    = true;
                grddata1.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #11
0
    public void BindQuoteDetail()
    {
        try
        {
            DataTable dt = bal.getallquotatationtermsandconditionsfroadminBAL(Convert.ToInt32(lblqno.Text));


            if (dt.Rows.Count > 0)
            {
                Grddata2.DataSource = dt;
                Grddata2.DataBind();
                Grddata2.UseAccessibleHeader    = true;
                Grddata2.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
            else
            {
                Grddata2.DataSource = dt;
                Grddata2.DataBind();
                Grddata2.UseAccessibleHeader    = true;
                Grddata2.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #12
0
        public DataTable Gets(string query)
        {
            var sql = query;
            var da  = new SqlDataAdapter(sql, Getconnection);
            var ds  = new DataTable();

            da.Fill(ds);
            Getconnection.Close();
            return(ds);
        }
Пример #13
0
 protected void dpcust_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         bincustcontact();
     }
     catch (Exception ex)
     {
         Getconnection.SiteErrorInsert(ex);
     }
 }
Пример #14
0
    // public void bindcustgroup()
    //{
    //    try
    //    {
    //        DataTable dtbtype = new DataTable();


    //        dtbtype = bal.getCustomerGroupNameBAL(lblloginid.Text);
    //        if (dtbtype.Rows.Count > 0)
    //        {
    //            dpcustgroup.DataSource = dtbtype;
    //            dpcustgroup.DataTextField = "Name";
    //            dpcustgroup.DataValueField = "Groupno";
    //            dpcustgroup.DataBind();
    //        }
    //        dpcustgroup.Items.Insert(0, new ListItem("----Select Group----", "0"));

    //    }
    //    catch (Exception ex)
    //    {
    //        Getconnection.SiteErrorInsert(ex);
    //    }
    //}

    public string getmaxcomno()
    {
        string        s = string.Empty, id = string.Empty;
        Getconnection c = new Getconnection();

        try
        {
            string     s1    = "select Top (1) No from tbl_Customer_Noseries    order By  Id DESC";
            SqlCommand cmd11 = new SqlCommand(s1, c.getconnection());
            if (cmd11.ExecuteScalar() != null)
            {
                id = cmd11.ExecuteScalar().ToString();
            }
            c.CloseConnection();
            int fid = 0;
            if (id.Equals(""))
            {
                id  = "1";
                fid = Convert.ToInt32(id);
            }
            else
            {
                fid = Convert.ToInt32(id);
                fid = fid + 1;
            }
            s             = fid.ToString();
            lblcomno.Text = s.ToString();
            //hfMaxEntryNo.Value = fid.ToString();
            bal.tbl_Customer_Noseries_InsertBAL(s, "", "");
        }
        catch (Exception ex)
        {
            //txtinqno.Text = "1";
        }
        finally
        {
            c.CloseConnection();
        }
        return(s);
    }
Пример #15
0
    public void binditem()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getallItemdataforadminBAL();
            if (dtbtype.Rows.Count > 0)
            {
                dpitem.DataSource     = dtbtype;
                dpitem.DataTextField  = "Itemname";
                dpitem.DataValueField = "id";
                dpitem.DataBind();
            }
            dpitem.Items.Insert(0, new ListItem("----Select Item----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #16
0
    public void bindcountry()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getallcountryfroadminBAL();
            if (dtbtype.Rows.Count > 0)
            {
                dpcountry.DataSource     = dtbtype;
                dpcountry.DataTextField  = "Country";
                dpcountry.DataValueField = "id";
                dpcountry.DataBind();
            }
            dpcountry.Items.Insert(0, new ListItem("----Select Country----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #17
0
    public void bindbusstype()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getallbusinesstypefroadminBAL();
            if (dtbtype.Rows.Count > 0)
            {
                dpbusstype.DataSource     = dtbtype;
                dpbusstype.DataTextField  = "BusinessTypeName";
                dpbusstype.DataValueField = "id";
                dpbusstype.DataBind();
            }
            dpbusstype.Items.Insert(0, new ListItem("----Select BussinessType----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #18
0
    public string getInquiryNo()
    {
        string        s = string.Empty, id = string.Empty;
        Getconnection c = new Getconnection();

        try
        {
            string     s1    = "select Top (1) QuotationNo from Quotation_Master    order By  Id DESC";
            SqlCommand cmd11 = new SqlCommand(s1, c.getconnection());
            if (cmd11.ExecuteScalar() != null)
            {
                id = cmd11.ExecuteScalar().ToString();
            }
            c.CloseConnection();
            int fid = 0;
            if (id.Equals(""))
            {
                id  = "1";
                fid = Convert.ToInt32(id);
            }
            else
            {
                fid = Convert.ToInt32(id);
                fid = fid + 1;
            }
            s          = fid.ToString();
            txtno.Text = s.ToString();
            //hfMaxEntryNo.Value = fid.ToString();
        }
        catch (Exception ex)
        {
            txtno.Text = "1";
        }
        finally
        {
            c.CloseConnection();
        }
        return(s);
    }
Пример #19
0
    public void bindState()
    {
        try
        {
            DataTable dtdept = new DataTable();

            dtdept = bal.getallstateforadminBAL();

            if (dtdept.Rows.Count > 0)
            {
                ddlgroup.DataSource     = dtdept;
                ddlgroup.DataTextField  = "State";
                ddlgroup.DataValueField = "id";
                ddlgroup.DataBind();
            }
            ddlgroup.Items.Insert(0, new ListItem("----Select State----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #20
0
    public void bindIndustry()
    {
        try
        {
            DataTable dtindustry = new DataTable();


            dtindustry = bal.getallIndustrygroupfroadminBAL();
            if (dtindustry.Rows.Count > 0)
            {
                dpindustry.DataSource     = dtindustry;
                dpindustry.DataTextField  = "IndustryName";
                dpindustry.DataValueField = "id";
                dpindustry.DataBind();
            }
            dpindustry.Items.Insert(0, new ListItem("----Select Industrytype----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #21
0
    public void binduom()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getallunitofmeasurementfroadminBAL();
            if (dtbtype.Rows.Count > 0)
            {
                dpuom.DataSource     = dtbtype;
                dpuom.DataTextField  = "UnitofMeasurement";
                dpuom.DataValueField = "id";
                dpuom.DataBind();
            }
            dpuom.Items.Insert(0, new ListItem("----Select UOM----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #22
0
    protected void dpstate_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getcitydataBAL(Convert.ToInt32(dpstate.SelectedValue.ToString()));
            if (dtbtype.Rows.Count > 0)
            {
                dpcity.DataSource     = dtbtype;
                dpcity.DataTextField  = "City";
                dpcity.DataValueField = "id";
                dpcity.DataBind();
            }
            dpcity.Items.Insert(0, new ListItem("----Select City----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #23
0
    public void binddesignation()
    {
        try
        {
            DataTable dtdesign = new DataTable();


            dtdesign = bal.getalldesignationfroadminBAL();
            if (dtdesign.Rows.Count > 0)
            {
                ddldesignation.DataSource     = dtdesign;
                ddldesignation.DataTextField  = "Designation";
                ddldesignation.DataValueField = "Id";
                ddldesignation.DataBind();
            }
            ddldesignation.Items.Insert(0, new ListItem("----Select Designation----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #24
0
    public void binddepartment()
    {
        try
        {
            DataTable dtdept = new DataTable();


            dtdept = bal.getalldepartmentfroadminBAL();
            if (dtdept.Rows.Count > 0)
            {
                ddlDept.DataSource     = dtdept;
                ddlDept.DataTextField  = "Department";
                ddlDept.DataValueField = "Id";
                ddlDept.DataBind();
            }
            ddlDept.Items.Insert(0, new ListItem("----Select Department----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #25
0
    public void bindcustomer()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getallCustomerMasterataforadminBAL();
            if (dtbtype.Rows.Count > 0)
            {
                dpcust.DataSource     = dtbtype;
                dpcust.DataTextField  = "Name";
                dpcust.DataValueField = "id";
                dpcust.DataBind();
            }
            dpcust.Items.Insert(0, new ListItem("----Select Customer----", "0"));
            //dpfollowstatus.Items.Insert(0, new ListItem("----Select Status----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #26
0
    public void bincustcontact()
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getCustomerConatctPersonBAL(Convert.ToInt32(dpcust.SelectedValue.ToString()));
            if (dtbtype.Rows.Count > 0)
            {
                dpcontactper.DataSource     = dtbtype;
                dpcontactper.DataTextField  = "ContactName";
                dpcontactper.DataValueField = "Id";
                dpcontactper.DataBind();
            }
            dpcontactper.Items.Insert(0, new ListItem("----Select Contact----", "0"));
            //  dpfollowstatus.Items.Insert(0, new ListItem("----Select Status----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }
Пример #27
0
    protected void dpcust_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            DataTable dtbtype = new DataTable();


            dtbtype = bal.getCustomerConatctPersonBAL(Convert.ToInt32(dpcust.SelectedValue.ToString()));
            if (dtbtype.Rows.Count > 0)
            {
                dpcontactper.DataSource     = dtbtype;
                dpcontactper.DataTextField  = "ContactName";
                dpcontactper.DataValueField = "Id";
                dpcontactper.DataBind();
            }
            dpcontactper.Items.Insert(0, new ListItem("----Select Contact----", "0"));
            //  dpfollowstatus.Items.Insert(0, new ListItem("----Select Status----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
        try
        {
            DataTable dtdept = new DataTable();


            dtdept = bal.getalldepartmentfroadminBAL();
            if (dtdept.Rows.Count > 0)
            {
                ddlDept.DataSource     = dtdept;
                ddlDept.DataTextField  = "Department";
                ddlDept.DataValueField = "id";
                ddlDept.DataBind();
            }
            ddlDept.Items.Insert(0, new ListItem("----Select Department----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
        try
        {
            DataTable dtdesign = new DataTable();


            dtdesign = bal.getalldesignationfroadminBAL();
            if (dtdesign.Rows.Count > 0)
            {
                ddldesign.DataSource     = dtdesign;
                ddldesign.DataTextField  = "Designation";
                ddldesign.DataValueField = "Id";
                ddldesign.DataBind();
            }
            ddldesign.Items.Insert(0, new ListItem("----Select Designation----", "0"));
        }
        catch (Exception ex)
        {
            Getconnection.SiteErrorInsert(ex);
        }
    }