public void AgentLogin(string empid)
 {
     CustomerMasterStoredProcedure objAgentlogin = new CustomerMasterStoredProcedure();
     //System.IO.File.Copy
     System.Data.DataSet ds = objAgentlogin.AgentLogin(empid);
     string CUST_ID = ds.Tables[0].Rows[0]["CUST_ID"].ToString();
     Session["CUST_ID"] = CUST_ID;
 }
 public void InsertCode(string CUST_COMPANY_NAME, string CUST_ID, string Agent)
 {
     CustomerMasterStoredProcedure objinsertGlCode = new CustomerMasterStoredProcedure();
     objinsertGlCode.InsertNewGenerateCode(CUST_COMPANY_NAME, CUST_ID, Agent);
 }
 public void insertupdatedoc(ArrayList doc)
 {
     CustomerMasterStoredProcedure objdocditail = new CustomerMasterStoredProcedure();
     objdocditail.insertdoc(doc);
 }
 public void insertnewDocument(string docid)
 {
     CustomerMasterStoredProcedure objdocditail = new CustomerMasterStoredProcedure();
     objdocditail.insertnewdoc(docid);
 }
 public void DeleteContact(int SR_NO)
 {
     CustomerMasterStoredProcedure objempentity = new CustomerMasterStoredProcedure();
     objempentity.DeleteContact(SR_NO);
 }
 public void DeleteRel(int CUST_REL_SRNO)
 {
     CustomerMasterStoredProcedure objempentity = new CustomerMasterStoredProcedure();
     objempentity.DeleteRel(CUST_REL_SRNO);
 }
 public void DeleteCustomer(int CUST_ID)
 {
     CustomerMasterStoredProcedure objempentity = new CustomerMasterStoredProcedure();
     objempentity.deletecust(CUST_ID);
 }
 public void InsertNewRel(string CUST_ID, string CUST_REL_ID,string CHAIN_SR_NO)
 {
     CustomerMasterStoredProcedure objnewRel = new CustomerMasterStoredProcedure();
     objnewRel.InsertNewRelation(CUST_ID, CUST_REL_ID,CHAIN_SR_NO);
 }
 public void InsertNewDetail(string CUST_ID, string CUST_REL_ID)
 {
     CustomerMasterStoredProcedure objnewid = new CustomerMasterStoredProcedure();
     objnewid.InsertNewDetail(CUST_ID, CUST_REL_ID);
 }
        public string InsertUpdateRelation(ArrayList Cust,string s)
        {
            CustomerMasterStoredProcedure objrel = new CustomerMasterStoredProcedure();
            Cust.Insert(20, Session["usersid"].ToString());
            //objrel.InsertUpdateRel(Cust);
            System.Data.DataSet ds1 = objrel.CheckValidation();

            int j = 0;

            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {

                if (ds1.Tables[0].Rows[i]["USER_NAME"].ToString().Equals(Cust[8]) || Cust[8].Equals(""))
                {
                    j = 1;
                    break;

                }

            }
            if (j == 0)
            {
               
                 objrel.InsertUpdateRel(Cust);
               
            }
            else if (j == 1)
            {

                System.Data.DataSet ds = objrel.InsertUpdateRel(Cust);
                s = ds.Tables[0].Rows[0]["EMAIL_CHECKER"].ToString();
                if (s == "N")
                {

                }
                if (s == "Y")
                {

                }
            }
            else
            {

            }
            return s;
     
        }
 public void InsertUpdateContdet(ArrayList Contdetail)
 {
     CustomerMasterStoredProcedure objcontdet = new CustomerMasterStoredProcedure();
     Contdetail.Insert(13, Session["usersid"].ToString());
     objcontdet.InsertUpdateContdet(Contdetail);
 }