Example #1
0
        private List <SqlParameter> Set_Values_In_Temp_Customer_Quality_Details(TempCustomerQualityDetailsInfo tempcustomerqualitydetails, string mode)
        {
            List <SqlParameter> sqlParams = new List <SqlParameter>();

            sqlParams.Add(new SqlParameter("@Enquiry_Id", tempcustomerqualitydetails.Enquiry_Id));
            sqlParams.Add(new SqlParameter("@Width_Of_Fabric", tempcustomerqualitydetails.Width_Of_Fabric));
            sqlParams.Add(new SqlParameter("@Coating", tempcustomerqualitydetails.Coating));
            sqlParams.Add(new SqlParameter("@Applications", tempcustomerqualitydetails.Applications));
            sqlParams.Add(new SqlParameter("@Physical_Appearance", tempcustomerqualitydetails.Physical_Appearance));
            sqlParams.Add(new SqlParameter("@Shades", tempcustomerqualitydetails.Shades));
            sqlParams.Add(new SqlParameter("@Finish", tempcustomerqualitydetails.Finish));
            sqlParams.Add(new SqlParameter("@Prints", tempcustomerqualitydetails.Prints));
            sqlParams.Add(new SqlParameter("@Customer_Approved_Sample", tempcustomerqualitydetails.Customer_Approved_Sample));
            sqlParams.Add(new SqlParameter("@Market_Segment", tempcustomerqualitydetails.Market_Segment));
            sqlParams.Add(new SqlParameter("@Lable_Tagging", tempcustomerqualitydetails.Lable_Tagging));
            sqlParams.Add(new SqlParameter("@CreatedBy", tempcustomerqualitydetails.CreatedBy));
            sqlParams.Add(new SqlParameter("@CreatedOn", tempcustomerqualitydetails.CreatedOn));
            sqlParams.Add(new SqlParameter("@Wrap_Count", tempcustomerqualitydetails.Wrap_Count));
            sqlParams.Add(new SqlParameter("@Weft_Count", tempcustomerqualitydetails.Weft_Count));
            sqlParams.Add(new SqlParameter("@Ends_Per_Inch", tempcustomerqualitydetails.Ends_Per_Inch));
            sqlParams.Add(new SqlParameter("@Pick_Per_Inch", tempcustomerqualitydetails.Pick_Per_Inch));
            if (mode != "update")
            {
                sqlParams.Add(new SqlParameter("@UpdatedBy", tempcustomerqualitydetails.UpdatedBy));
                sqlParams.Add(new SqlParameter("@UpdatedOn", tempcustomerqualitydetails.UpdatedOn));
            }
            return(sqlParams);
        }
Example #2
0
        private TempCustomerQualityDetailsInfo Get_Temp_Customer_Quality_Details_Values(DataRow dr)
        {
            TempCustomerQualityDetailsInfo tempcustomerqualitydetails = new TempCustomerQualityDetailsInfo();

            tempcustomerqualitydetails.Enquiry_Id          = Convert.ToInt32(dr["Enquiry_Id"]);
            tempcustomerqualitydetails.Width_Of_Fabric     = Convert.ToString(dr["Width_Of_Fabric"]);
            tempcustomerqualitydetails.Coating             = Convert.ToString(dr["Coating"]);
            tempcustomerqualitydetails.Applications        = Convert.ToString(dr["Applications"]);
            tempcustomerqualitydetails.Physical_Appearance = Convert.ToString(dr["Physical_Appearance"]);
            tempcustomerqualitydetails.Shades = Convert.ToInt32(dr["Shades"]);
            tempcustomerqualitydetails.Finish = Convert.ToString(dr["Finish"]);
            tempcustomerqualitydetails.Prints = Convert.ToString(dr["Prints"]);
            tempcustomerqualitydetails.Customer_Approved_Sample = Convert.ToInt32(dr["Customer_Approved_Sample"]);
            tempcustomerqualitydetails.Market_Segment           = Convert.ToString(dr["Market_Segment"]);
            tempcustomerqualitydetails.Lable_Tagging            = Convert.ToString(dr["Lable_Tagging"]);
            tempcustomerqualitydetails.CreatedBy = Convert.ToInt32(dr["CreatedBy"]);
            tempcustomerqualitydetails.CreatedOn = Convert.ToDateTime(dr["CreatedOn"]);
            tempcustomerqualitydetails.UpdatedBy = Convert.ToInt32(dr["UpdatedBy"]);
            tempcustomerqualitydetails.UpdatedOn = Convert.ToDateTime(dr["UpdatedOn"]);

            if (DBNull.Value != dr["Wrap_Count"])
            {
                tempcustomerqualitydetails.Wrap_Count = Convert.ToDecimal(dr["Wrap_Count"]);
            }

            if (DBNull.Value != dr["Weft_Count"])
            {
                tempcustomerqualitydetails.Weft_Count = Convert.ToDecimal(dr["Weft_Count"]);
            }

            if (DBNull.Value != dr["Ends_Per_Inch"])
            {
                tempcustomerqualitydetails.Ends_Per_Inch = Convert.ToDecimal(dr["Ends_Per_Inch"]);
            }

            if (DBNull.Value != dr["Pick_Per_Inch"])
            {
                tempcustomerqualitydetails.Pick_Per_Inch = Convert.ToDecimal(dr["Pick_Per_Inch"]);
            }

            tempcustomerqualitydetails.Sample_No  = Convert.ToString(dr["Sample_No"]);
            tempcustomerqualitydetails.Shade_Name = Convert.ToString(dr["Shade_Name"]);

            return(tempcustomerqualitydetails);
        }
Example #3
0
        public TempCustomerQualityDetailsInfo Get_Temp_Customer_Quality_Details_By_Id(int enquiry_Id)
        {
            TempCustomerQualityDetailsInfo temp_Customer_Quality_Details = new TempCustomerQualityDetailsInfo();

            List <SqlParameter> sqlParams = new List <SqlParameter>();

            sqlParams.Add(new SqlParameter("@Enquiry_Id", enquiry_Id));

            DataTable dt = _sqlRepo.ExecuteDataTable(sqlParams, StoredProcedures.Get_Temp_Customer_Quality_Details_By_Id_Sp.ToString(), CommandType.StoredProcedure);

            List <DataRow> drList = new List <DataRow>();

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

            foreach (DataRow dr in drList)
            {
                temp_Customer_Quality_Details = Get_Temp_Customer_Quality_Details_Values(dr);
            }
            return(temp_Customer_Quality_Details);
        }
Example #4
0
        public void Update_Temp_Customer_Quality_Details(TempCustomerQualityDetailsInfo temp_Customer_Quality_Details)
        {
            string mode = "update";

            _sqlRepo.ExecuteNonQuery(Set_Values_In_Temp_Customer_Quality_Details(temp_Customer_Quality_Details, mode), StoredProcedures.Update_Supporting_Details_Sp.ToString(), CommandType.StoredProcedure);
        }
Example #5
0
        public void Insert_Temp_Customer_Quality_Details(TempCustomerQualityDetailsInfo temp_Customer_Quality_Details)
        {
            string mode = "insert";

            _sqlRepo.ExecuteNonQuery(Set_Values_In_Temp_Customer_Quality_Details(temp_Customer_Quality_Details, mode), StoredProcedures.Insert_Temp_Customer_Quality_Details_Sp.ToString(), CommandType.StoredProcedure);
        }
 public void Update_Temp_Customer_Quality_Details(TempCustomerQualityDetailsInfo temp_Customer_Quality_Details)
 {
     _enquiryRepo.Update_Temp_Customer_Quality_Details(temp_Customer_Quality_Details);
 }
 public void Insert_Temp_Customer_Quality_Details(TempCustomerQualityDetailsInfo temp_Customer_Quality_Details)
 {
     _enquiryRepo.Insert_Temp_Customer_Quality_Details(temp_Customer_Quality_Details);
 }