示例#1
0
        public int Insert_Industrial(IndustrialInfo industrialInfo)
        {
            int industrial_Master_Id = 0;

            industrial_Master_Id = Convert.ToInt32(_sqlRepo.ExecuteScalerObj(Set_Values_In_Industrial(industrialInfo), StoredProcedures.Insert_Industrial_Master_Sp.ToString(), CommandType.StoredProcedure));
            return(industrial_Master_Id);
        }
示例#2
0
        private IndustrialInfo Get_Industrial_Values(DataRow dr)
        {
            IndustrialInfo industrial = new IndustrialInfo();

            industrial.Industrial_Master_Id     = Convert.ToInt32(dr["Industrial_Master_Id"]);
            industrial.Industrial_Category_Name = Convert.ToString(dr["Industrial_Category_Name"]);
            industrial.Industrial_Group_Name    = Convert.ToString(dr["Industrial_Group_Name"]);
            industrial.Industrial_SubGrp_Name   = Convert.ToString(dr["Industrial_SubGrp_Name"]);
            industrial.Size = Convert.ToString(dr["Size"]);
            industrial.COD  = Convert.ToString(dr["COD"]);
            return(industrial);
        }
示例#3
0
 public IndustrialViewModel()
 {
     Industrial         = new IndustrialInfo();
     Industrial_Vendor  = new IndustrialVendorInfo();
     Industrials        = new List <IndustrialInfo>();
     Industrial_Vendors = new List <IndustrialVendorInfo>();
     Pager = new PaginationInfo();
     Industrial_Categories = new List <IndustrialCategoryInfo>();
     Industrial_Groups     = new List <IndustrialGroupInfo>();
     Friendly_Message      = new List <FriendlyMessageInfo>();
     Filter = new IndustrialFilter();
 }
示例#4
0
        private List <SqlParameter> Set_Values_In_Industrial(IndustrialInfo industrialInfo)
        {
            List <SqlParameter> sqlParamList = new List <SqlParameter>();

            if (industrialInfo.Industrial_Master_Id != 0)
            {
                sqlParamList.Add(new SqlParameter("@Industrial_Master_Id", industrialInfo.Industrial_Master_Id));
            }
            sqlParamList.Add(new SqlParameter("@Industrial_Category_Id", industrialInfo.Industrial_Category_Id));
            sqlParamList.Add(new SqlParameter("@Industrial_Group_Id", industrialInfo.Industrial_Group_Id));
            sqlParamList.Add(new SqlParameter("@Industrial_SubGroup_Name", industrialInfo.Industrial_SubGrp_Name));
            sqlParamList.Add(new SqlParameter("@Size", industrialInfo.Size));
            sqlParamList.Add(new SqlParameter("@COD", industrialInfo.COD));
            if (industrialInfo.Industrial_Master_Id == 0)
            {
                sqlParamList.Add(new SqlParameter("@CreatedBy", industrialInfo.CreatedBy));
            }
            sqlParamList.Add(new SqlParameter("@UpdatedBy", industrialInfo.UpdatedBy));
            return(sqlParamList);
        }
示例#5
0
        public IndustrialInfo Get_Industrial_Master_By_Id(int industrial_Master_Id)
        {
            IndustrialInfo      industrial = new IndustrialInfo();
            List <SqlParameter> sqlParams  = new List <SqlParameter>();

            sqlParams.Add(new SqlParameter("@Industrial_Master_Id", industrial_Master_Id));
            DataTable dt = _sqlRepo.ExecuteDataTable(sqlParams, StoredProcedures.Get_Industrial_Master_By_Id_Sp.ToString(), CommandType.StoredProcedure);

            if (dt != null && dt.Rows.Count > 0)
            {
                int            count  = 0;
                List <DataRow> drList = new List <DataRow>();

                drList = dt.AsEnumerable().ToList();

                count = drList.Count();

                foreach (DataRow dr in drList)
                {
                    industrial = Get_Industrial_Values_By_Id(dr);
                }
            }
            return(industrial);
        }
示例#6
0
 public void Update_Industrial(IndustrialInfo industrialInfo)
 {
     _sqlRepo.ExecuteNonQuery(Set_Values_In_Industrial(industrialInfo), StoredProcedures.Update_Industrial_Master_Sp.ToString(), CommandType.StoredProcedure);
 }
 public void Update_Industrial(IndustrialInfo industrialInfo)
 {
     _industrialRepo.Update_Industrial(industrialInfo);
 }
 public int Insert_Industrial(IndustrialInfo industrialInfo)
 {
     return(_industrialRepo.Insert_Industrial(industrialInfo));
 }