Esempio n. 1
0
    public int AddRecord(JCompanyRegBLL JCRB)
    {
        //SqlCommand cmd = new SqlCommand();
        SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["Connectionstring"]);

        //cmd.Connection = con;
        SqlParameter[] par = new SqlParameter[]
        {
            new SqlParameter("@NameOfComp", JCRB.NameOfComp1), new SqlParameter("@TypeOfUnit", JCRB.TypeOfUnit1),
            new SqlParameter("@DirectName", JCRB.DirectName1), new SqlParameter("@MobileNo", JCRB.MobileNo1),
            new SqlParameter("@EmailId", JCRB.EmailId1), new SqlParameter("@FAddress", JCRB.FAddress1),
            new SqlParameter("@State", JCRB.State1), new SqlParameter("@District", JCRB.District1),
            new SqlParameter("@Taluka", JCRB.Taluka1), new SqlParameter("@City", JCRB.City1),
            new SqlParameter("@Sectors", JCRB.Sectors1), new SqlParameter("@UserId", JCRB.UserId1),
            new SqlParameter("@EntryDate", JCRB.EntryDate1)
        };
        SqlCommand cmd = new SqlCommand("uspJCompReg", con);

        cmd.Parameters.AddRange(par);
        cmd.CommandType = CommandType.StoredProcedure;
        SqlDataAdapter da = new SqlDataAdapter(cmd);

        con.Open();
        int result = cmd.ExecuteNonQuery();

        return(result);
    }
Esempio n. 2
0
    //public DataSet LoadgridBLL(BExpEntriesBLL objBExpEntriesBLL)
    //{
    //    return objBExpEntriesDAL.LoadGrid(objBExpEntriesBLL);

    //}
    public int AddRecordBLL(JCompanyRegBLL objJCompanyRegBLL)
    {
        int k = objJCompanyRegDAL.AddRecord(objJCompanyRegBLL);

        return(k);
    }