public string InsertUpdateSupplierEmployeeNew(ArrayList Employee,string s)
        {

            CRM.DataAccess.AdministratorEntity.SupplierMasterStoredProcedure objinsertemployee = new CRM.DataAccess.AdministratorEntity.SupplierMasterStoredProcedure();
            Employee.Insert(10, Session["usersid"].ToString());
            //objinsertemployee.InsertUpdateSupplierEmployeeNew(Employee);

            System.Data.DataSet ds1 = objinsertemployee.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(Employee[4]) || Employee[4].Equals(""))
                {
                    j = 1;
                    break;

                }

            }

            if (j == 0)
            {


                objinsertemployee.InsertUpdateSupplierEmployeeNew(Employee);
            }
            else if (j == 1)
            {

                
                System.Data.DataSet ds = objinsertemployee.InsertUpdateSupplierEmployeeNew(Employee);
                
                s = ds.Tables[0].Rows[0]["EMAIL_CHECKER"].ToString();
                if (s == "N")
                {

                }
                if (s == "Y")
                {

                }

            }
            else
            {

            }
            return s;
        }
        public string InsertUpdateSupplier(ArrayList Supply,string s)
        {

            SupplierMasterStoredProcedure objsupplier = new SupplierMasterStoredProcedure();
            Supply.Insert(18, Session["usersid"].ToString());
            //objsupplier.InsertUpdateSupplier(Supply);

            System.Data.DataSet ds1 = objsupplier.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(Supply[15]) || Supply[15].Equals(""))
                {
                    j = 1;
                    break;

                }

            }

            if (j == 0)
            {


                objsupplier.InsertUpdateSupplier(Supply);
            }
            else if (j == 1)
            {

               
                System.Data.DataSet ds = objsupplier.InsertUpdateSupplier(Supply);

                s = ds.Tables[0].Rows[0]["EMAIL_CHECKER"].ToString();
                if (s == "N")
                {

                }
                if (s == "Y")
                {

                }

            }
            else
            {

            }
            return s;

        }