Esempio n. 1
0
 private bool IsErrYearWeek(PHDS_HaulierUpload.TransportationRow dr)
 {
     try
     {
         if (dr.Year_Week_OnFile != txtWeek.Text) return true;
         else return false;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Esempio n. 2
0
        private bool IsErrCaseI(PHDS_HaulierUpload.TransportationRow dr, DataView dv)
        {
            try
            {
                string str = "Haulier_Abbr='" + dr.Haulier_Abbr + "' and PO_no='" + dr.PO_No + "' and Delivery_ref='" + dr.Delivery_Ref + "' and Delivery_date='" + dr.Delivery_Date + "' ";
                str += "and Vendor_code = '" + dr.Vendor_Code + "' and Delivery_location = '" + dr.Delivery_Location + "'";
                str += "and Ratetype = '" + dr.RateType + "' and Rate_Per_Unit = '" + dr.Rate_Per_Unit + "'"; // + "' and Collection_point = '" + dr.Collection_Point
                dv.RowFilter = new System.Text.StringBuilder().Append(str).ToString();

                return dv.Count > 0 ? true : false;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Esempio n. 3
0
        private string IsErrCaseII(PHDS_HaulierUpload.TransportationRow dr)
        {
            try
            {
                string str = "";
                if (string.IsNullOrEmpty(dr.PO_No) && dr.Remark1.Trim().ToLower() == "miscellaneous") str = "M";
                else if (string.IsNullOrEmpty(dr.PO_No) && dr.Remark1.Trim().ToLower() == "rejecteditems") str = "R";
                else if (string.IsNullOrEmpty(dr.PO_No)) str = "N";
                else if (dr.Vendor_Name == "Dummy" && dr.PO_No == "" && dr.Total_Cost > 0) str = "L";

                return str;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Esempio n. 4
0
        private string checkHalier(PHDS_HaulierUpload.TransportationRow dr)
        {
            try
            {
                string rtn = PH_HaulierUpload.PH_HaulierUp_FindRateCard(AppCode.strConnDB, dr);

                return rtn;
            }
            catch (Exception ex)
            {
                throw new Exception("checkHalier >> " + ex.Message);
            }
        }