예제 #1
0
        private void CreateNumericTextBox()
        {
            Label lbl = new Label()
            {
                Text       = _SettingEntity.Setting_nvc
                , Top      = 18
                , AutoSize = true
            };

            SettingGroupBox.Controls.Add(lbl);

            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox()
            {
                MaxLength          = 9
                , MaxWholeDigits   = 19
                , MaxDecimalPlaces = 9
                , Text             = _SettingEntity.Value_nvc
                , Name             = "TextBox" + _SettingEntity.SettingID_int
                , Width            = 150
                , Top  = 16
                , Left = 6
            };
            SettingGroupBox.Controls.Add(txt);
            txt.TextChanged += new EventHandler(Numerictxt_TextChanged);

            this.Width = lbl.PreferredWidth + txt.Width + 30;
            lbl.Left   = txt.Right;
        }
예제 #2
0
        public OtherCarReport(HPS.BLL.TrafficBLL.BLLTraffic_T TrafficEntityrpt)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();


            DateTextBox.Text      = TrafficEntityrpt.Date_nvc;
            TimeTextBox.Text      = TrafficEntityrpt.Time_nvc;
            TrafficNumbertxt.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            Servicestxt.Text      = " مراجعه به : " + TrafficEntityrpt.Services_nvc;
            CarTypetxt.Text       = "نوع وسیله : " + TrafficEntityrpt.System_nvc;
            HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory PlateCityFactory = new HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory();
            HPS.BLL.PlateCityBLL.BLLPlateCity_T        PlatecityEntity  = new HPS.BLL.PlateCityBLL.BLLPlateCity_T();
            HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys    PlateCityKey     = new HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys();
            PlateCityKey.PlateCityID_int = TrafficEntityrpt.PlateCityID_int;
            PlatecityEntity     = PlateCityFactory.GetBy(PlateCityKey);
            NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + PlatecityEntity.PlateCity_nvc + " " + TrafficEntityrpt.SerialPlate_nvc;
            HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory BillFactory = new HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory();
            if (TrafficEntityrpt.BillMessageID_int == 0 || TrafficEntityrpt.BillMessageID_int == null)
            {
            }
            else
            {
                string Billcondition = "[BillMessage_T].[BillMessageID_int]=" + TrafficEntityrpt.BillMessageID_int;
                List <HPS.BLL.BillMessageBLL.BLLBillMessage_T> BillLst = BillFactory.GetAllByCondition(Billcondition);
                if (BillLst != null)
                {
                    Messagetxt.Text = BillLst[0].Message_nvc;
                }
            }
            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox();
            txt.DigitsInGroup = 3;
            if (TrafficEntityrpt.Price_dec != null)
            {
                txt.Text      = TrafficEntityrpt.Price_dec.ToString();
                Pricetxt.Text = " مبلغ دریافتی هنگام ورود " + txt.Text + "  ريال می باشد";
            }
            AllowableHourtxt.Text = TrafficEntityrpt.AllowableHour_int.ToString();
            ExtraHourtxt.Text     = TrafficEntityrpt.ExtraHour_int.ToString();
            txt.Text                  = TrafficEntityrpt.Fee_dec.ToString();
            Feetxt.Text               = txt.Text;
            txt.Text                  = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            ExtraHourFeetxt.Text      = txt.Text;
            UserNametxt.Text          = TrafficEntityrpt.UserName_nvc;
            TrafficNumberbarcode.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();

            if (TrafficEntityrpt.Printed_bit == true)
            {
                this.txtPrintedAgain.Visible = true;
            }
            else
            {
                this.txtPrintedAgain.Visible = false;
                HPS.BLL.TrafficBLL.BLLTraffic_TFactory TrafficFactory = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
                try
                {
                    HPS.BLL.TrafficBLL.BLLTraffic_TKeys TrafficKey = new HPS.BLL.TrafficBLL.BLLTraffic_TKeys();
                    TrafficKey.TrafficID_bint    = TrafficEntityrpt.TrafficID_bint;
                    TrafficEntityrpt.Printed_bit = true;
                    TrafficFactory.BeginProc();
                    TrafficFactory.Update(TrafficEntityrpt, TrafficKey);
                    TrafficFactory.CommitProc();
                }
                catch (Exception ex)
                {
                    TrafficFactory.RollBackProc();
                    throw ex;
                }
            }
        }
예제 #3
0
        public IranianTrafficEditReport(HPS.BLL.TrafficBLL.BLLTraffic_TKeys TrafficKey)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            HPS.BLL.TrafficBLL.BLLTraffic_TFactory TrafficFactory   = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
            HPS.BLL.TrafficBLL.BLLTraffic_T        TrafficEntityrpt = TrafficFactory.GetBy(TrafficKey);
            DateTextBox.Text      = TrafficEntityrpt.Date_nvc;
            TimeTextBox.Text      = TrafficEntityrpt.Time_nvc;
            TrafficNumbertxt.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            TurnNumbertxt.Text    = TrafficEntityrpt.TurnNumber_bint.ToString();
            HPS.BLL.ServicesBLL.BLLServices_TFactory servicesFactory = new HPS.BLL.ServicesBLL.BLLServices_TFactory();
            HPS.BLL.ServicesBLL.BLLServices_TKeys    ServicesKey     = new HPS.BLL.ServicesBLL.BLLServices_TKeys();
            ServicesKey.ServicesID_int = TrafficEntityrpt.ServiceID_int;
            HPS.BLL.ServicesBLL.BLLServices_T ServicesEntity = new HPS.BLL.ServicesBLL.BLLServices_T();
            ServicesEntity     = servicesFactory.GetBy(ServicesKey);
            Servicestxt.Text   = " مراجعه به : " + ServicesEntity.ServicesType_nvc;
            DriverNametxt.Text = " نام راننده : " + TrafficEntityrpt.FirstName_nvc + " " + TrafficEntityrpt.LastName_nvc;
            HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory laderTypeFactory = new HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory();
            string LaderTypecondition = "[LaderType_T].[LaderTypeID_int]='" + TrafficEntityrpt.LaderTypeID_int + "'";
            List <HPS.BLL.LaderTypeBLL.BLLLaderType_T> LaderTypeLst = laderTypeFactory.GetAllByCondition(LaderTypecondition);

            if (LaderTypeLst != null)
            {
                CarTypetxt.Text = "نوع وسیله : " + TrafficEntityrpt.System_nvc + "-  " + LaderTypeLst[0].LaderType_nvc;
            }
            HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory PlatecityFactory = new HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory();
            HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys    Platecitykey     = new HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys();
            Platecitykey.PlateCityID_int = TrafficEntityrpt.PlateCityID_int;
            HPS.BLL.PlateCityBLL.BLLPlateCity_T PlateCityEntity = new HPS.BLL.PlateCityBLL.BLLPlateCity_T();
            PlateCityEntity = PlatecityFactory.GetBy(Platecitykey);
            if (PlateCityEntity != null)
            {
                NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + PlateCityEntity.PlateCity_nvc + " " + TrafficEntityrpt.SerialPlate_nvc;
            }
            else
            {
                NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + TrafficEntityrpt.SerialPlate_nvc;
            }
            if (TrafficEntityrpt.WithLade_bit == true)
            {
                WithLadetxt.Text = "وضعیت : " + "با بار" + "(" + TrafficEntityrpt.Comment_nvc + ") ";
            }
            else
            {
                WithLadetxt.Text = "وضعیت : " + "بدون بار";
            }
            HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory BillFactory = new HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory();
            if (TrafficEntityrpt.BillMessageID_int == 0 || TrafficEntityrpt.BillMessageID_int == null)
            {
            }
            else
            {
                string Billcondition = "[BillMessage_T].[BillMessageID_int]=" + TrafficEntityrpt.BillMessageID_int;
                List <HPS.BLL.BillMessageBLL.BLLBillMessage_T> BillLst = BillFactory.GetAllByCondition(Billcondition);
                if (BillLst != null)
                {
                    Messagetxt.Text = BillLst[0].Message_nvc;
                }
            }
            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox();
            txt.DigitsInGroup = 3;
            if (TrafficEntityrpt.Price_dec != null)
            {
                txt.Text      = TrafficEntityrpt.Price_dec.ToString();
                Pricetxt.Text = " مبلغ دریافتی هنگام ورود " + txt.Text + "  ريال می باشد";
            }
            //AllowableHourtxt.Text = TrafficEntityrpt.AllowableHour_int.ToString();
            //txt.Text = TrafficEntityrpt.Fee_dec.ToString();
            //Feetxt.Text = txt.Text;
            //ExtraHourtxt.Text = TrafficEntityrpt.ExtraHour_int.ToString();

            // txt.Text = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            //ExtraHourFeetxt.Text = txt.Text;
            UserNametxt.Text          = TrafficEntityrpt.UserName_nvc;
            TrafficNumberbarcode.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            if (TrafficEntityrpt.TurnAccepted_bit == false && TrafficEntityrpt.TurnHour_int != null)
            {
                TurnNumberAllerttxt.Text = " شماره نوبت شما رزرو می باشد لطفاً تا " + TrafficEntityrpt.TurnHour_int.ToString() + " ساعت نسبت به تأیید آن اقدام نمایید";
            }
        }
예제 #4
0
        public ForeignCarsReport(HPS.BLL.TrafficBLL.BLLTraffic_T TrafficEntity)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            this.TrafficEntityrpt = TrafficEntity;

            DateTextBox.Text      = TrafficEntityrpt.Date_nvc;
            TimeTextBox.Text      = TrafficEntityrpt.Time_nvc;
            TrafficNumbertxt.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            DriverNametxt.Text    = " نام راننده : " + TrafficEntityrpt.FirstName_nvc + " " + TrafficEntityrpt.LastName_nvc;
            HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory laderTypeFactory = new HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory();
            string LaderTypecondition = "[LaderType_T].[LaderTypeID_int]='" + TrafficEntityrpt.LaderTypeID_int + "'";
            List <HPS.BLL.LaderTypeBLL.BLLLaderType_T> LaderTypeLst = laderTypeFactory.GetAllByCondition(LaderTypecondition);

            if (LaderTypeLst != null)
            {
                CarTypetxt.Text = "نوع وسيله : " + TrafficEntityrpt.System_nvc + "-  " + LaderTypeLst[0].LaderType_nvc;
            }
            if (!string.IsNullOrEmpty(TrafficEntityrpt.SerialPlate_nvc))
            {
                NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + TrafficEntityrpt.SerialPlate_nvc;
            }
            else
            {
                NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc);
            }

            if (TrafficEntityrpt.WithLade_bit == true)
            {
                WithLadetxt.Text = "وضعیت : " + "با بار" + "(" + TrafficEntityrpt.Comment_nvc + ") ";
            }
            else
            {
                WithLadetxt.Text = "وضعیت : " + "بدون بار";
            }
            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox();
            txt.DigitsInGroup = 3;
            if (TrafficEntityrpt.Price_dec != null)
            {
                txt.Text      = TrafficEntityrpt.Price_dec.ToString();
                Pricetxt.Text = " مبلغ دریافتی هنگام ورود " + txt.Text + "  ريال می باشد";
            }
            AllowableHourtxt.Text = TrafficEntityrpt.AllowableHour_int.ToString();
            ExtraHourtxt.Text     = TrafficEntityrpt.ExtraHour_int.ToString();
            txt.Text                  = TrafficEntityrpt.Fee_dec.ToString();
            Feetxt.Text               = txt.Text;
            txt.Text                  = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            ExtraHourFeetxt.Text      = txt.Text;
            UserNametxt.Text          = TrafficEntityrpt.UserName_nvc;
            TrafficNumberbarcode.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();

            if (TrafficEntityrpt.Printed_bit == true)
            {
                this.txtPrintedAgain.Visible = true;
            }
            else
            {
                this.txtPrintedAgain.Visible = false;
                HPS.BLL.TrafficBLL.BLLTraffic_TFactory TrafficFactory = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
                try
                {
                    HPS.BLL.TrafficBLL.BLLTraffic_TKeys TrafficKey = new HPS.BLL.TrafficBLL.BLLTraffic_TKeys();
                    TrafficKey.TrafficID_bint    = TrafficEntityrpt.TrafficID_bint;
                    TrafficEntityrpt.Printed_bit = true;
                    TrafficFactory.BeginProc();
                    TrafficFactory.Update(TrafficEntityrpt, TrafficKey);
                    TrafficFactory.CommitProc();
                }
                catch (Exception ex)
                {
                    TrafficFactory.RollBackProc();
                    throw ex;
                }
            }
        }
예제 #5
0
        public AcceptedTurnReport(HPS.BLL.TrafficBLL.BLLTraffic_T TrafficEntityrpt)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            HPS.BLL.TrafficBLL.BLLTraffic_TFactory TrafficFactory = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
            HPS.BLL.TrafficBLL.BLLTraffic_TKeys    TrafficKey     = new HPS.BLL.TrafficBLL.BLLTraffic_TKeys();
            //HPS.BLL.TrafficBLL.BLLTraffic_T TrafficEntityrpt = new HPS.BLL.TrafficBLL.BLLTraffic_T();
            //TrafficKey.TrafficID_bint = TrafficID_bint;
            //TrafficEntityrpt = TrafficFactory.GetBy(TrafficKey);

            AcceptedDateTextBox.Text = TrafficEntityrpt.TurnDate_nvc;

            AcceptedTimeTextBox.Text = TrafficEntityrpt.TurnTime_nvc;

            InDateTextBox.Text = TrafficEntityrpt.Date_nvc;
            InTimeTextBox.Text = TrafficEntityrpt.Time_nvc;

            InDatetext2Box.Text = TrafficEntityrpt.Date_nvc;
            InTimetext2Box.Text = TrafficEntityrpt.Time_nvc;

            DateTextBox.Text = TrafficFactory.ServerJalaliDate;
            TimeTextBox.Text = TrafficFactory.ServerTime;

            if (TrafficEntityrpt.AcceptedTurnNumber_bint.HasValue)
            {
                TurnNumber2txt.Text = "شماره نوبت : " + TrafficEntityrpt.AcceptedTurnNumber_bint.ToString();
                TurnNumbertxt.Text  = "شماره نوبت : " + TrafficEntityrpt.AcceptedTurnNumber_bint.ToString();
            }
            else
            {
                TurnNumber2txt.Text = "شماره نوبت رزرو : " + TrafficEntityrpt.TurnNumber_bint.ToString();
                TurnNumbertxt.Text  = "شماره نوبت رزرو : " + TrafficEntityrpt.TurnNumber_bint.ToString();
            }


            TrafficNumbertxt.Text  = "شماره قبض : " + TrafficEntityrpt.TrafficNumber_bint.ToString();
            TrafficNumber2txt.Text = "شماره قبض : " + TrafficEntityrpt.TrafficNumber_bint.ToString();

            DriverNametxt.Text  = " نام راننده : " + TrafficEntityrpt.FirstName_nvc + " " + TrafficEntityrpt.LastName_nvc;
            DriverName2txt.Text = " نام راننده : " + TrafficEntityrpt.FirstName_nvc + " " + TrafficEntityrpt.LastName_nvc;

            HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory laderTypeFactory = new HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory();
            string LaderTypecondition = "[LaderType_T].[LaderTypeID_int]='" + TrafficEntityrpt.LaderTypeID_int + "'";
            List <HPS.BLL.LaderTypeBLL.BLLLaderType_T> LaderTypeLst = laderTypeFactory.GetAllByCondition(LaderTypecondition);

            if (LaderTypeLst != null)
            {
                CarTypetxt.Text  = "نوع وسیله : " + TrafficEntityrpt.System_nvc + "-  " + LaderTypeLst[0].LaderType_nvc; //+ "- کد:" + LaderTypeLst[0].LaderTypeID_int.ToString() ;
                CarType2txt.Text = "نوع وسیله : " + TrafficEntityrpt.System_nvc + "-  " + LaderTypeLst[0].LaderType_nvc;
            }
            HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory PlatecityFactory = new HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory();
            HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys    Platecitykey     = new HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys();
            Platecitykey.PlateCityID_int = TrafficEntityrpt.PlateCityID_int;
            HPS.BLL.PlateCityBLL.BLLPlateCity_T PlateCityEntity = new HPS.BLL.PlateCityBLL.BLLPlateCity_T();
            PlateCityEntity = PlatecityFactory.GetBy(Platecitykey);

            if (PlateCityEntity != null)
            {
                NumberPlatetxt.Text  = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + PlateCityEntity.PlateCity_nvc + " " + TrafficEntityrpt.SerialPlate_nvc;
                NumberPlate2txt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + PlateCityEntity.PlateCity_nvc + " " + TrafficEntityrpt.SerialPlate_nvc;
            }
            else
            {
                NumberPlatetxt.Text  = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + TrafficEntityrpt.SerialPlate_nvc;
                NumberPlate2txt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + TrafficEntityrpt.SerialPlate_nvc;
            }


            DriverCardNumbertxt.Text = "شماره كارت راننده :" + TrafficEntityrpt.DriverCardNumber_nvc;

            CarCardNumbertxt.Text = "شماره كارت كاميون :" + TrafficEntityrpt.CarCardNumber_nvc;

            HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory BillFactory = new HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory();
            if (TrafficEntityrpt.BillMessageID_int == 0 || TrafficEntityrpt.BillMessageID_int == null)
            {
            }
            else
            {
                string Billcondition = "[BillMessage_T].[BillMessageID_int]=" + TrafficEntityrpt.BillMessageID_int;
                List <HPS.BLL.BillMessageBLL.BLLBillMessage_T> BillLst = BillFactory.GetAllByCondition(Billcondition);
                if (BillLst != null)
                {
                    Messagetxt.Text = BillLst[0].Message_nvc;
                }
            }
            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox();
            txt.DigitsInGroup = 3;
            if (TrafficEntityrpt.Price_dec != null)
            {
                txt.Text      = TrafficEntityrpt.Price_dec.ToString();
                Pricetxt.Text = " مبلغ دریافت شده هنگام ورود " + txt.Text + "  ريال می باشد";
            }
            UserNametxt.Text = HPS.Common.CurrentUser.user.UserName_nvc;
            if (!string.IsNullOrEmpty(TrafficEntityrpt.AcceptedTurnComment_nvc))
            {
                if (TrafficEntityrpt.Area_bit)
                {
                    Commenttxt.Text = "توضيحات : " + TrafficEntityrpt.AcceptedTurnComment_nvc + " حومه";
                }
                else
                {
                    Commenttxt.Text = "توضيحات : " + TrafficEntityrpt.AcceptedTurnComment_nvc;
                }
            }
            else
            {
                if (TrafficEntityrpt.Area_bit)
                {
                    Commenttxt.Text = "حومه";
                }
            }
            TrafficNumberbarcode.Text     = TrafficEntityrpt.TrafficNumber_bint.ToString();
            TrafficNumber_intbarcode.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            //if (!TrafficEntityrpt.DriverOffline_bit)
            //{
            //    OfflineReadtxt.Text = "آنلاین";
            //}
            //else
            //{
            //    OfflineReadtxt.Text = "آفلاین";
            //}
            //////////////
            HPS.BLL.SettingsBLL.BLLSetting_TFactory settingsFactory = new HPS.BLL.SettingsBLL.BLLSetting_TFactory();
            HPS.BLL.SettingsBLL.BLLSetting_T        SettingEntity   = new HPS.BLL.SettingsBLL.BLLSetting_T();
            HPS.BLL.SettingsBLL.BLLSetting_TKeys    SettingKey      = new HPS.BLL.SettingsBLL.BLLSetting_TKeys();
            SettingKey.SettingID_int = 1002;
            SettingEntity            = settingsFactory.GetBy(SettingKey);
            AllowableHourtxt.Text    = SettingEntity.Value_nvc; //TrafficEntityrpt.AllowableHour_int.ToString();
            Feetxt.Text       = txt.Text;
            ExtraHourtxt.Text = TrafficEntityrpt.ExtraHour_int.ToString();

            //if (TrafficEntityrpt.WithFlat_bit==true)
            //{
            //txt.Text = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            //}
            ExtraHourFeetxt.Text = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            //////////////
            if (TrafficEntityrpt.TurnPrinted_bit == true)
            {
                this.txtPrintedAgain.Visible = true;
                UserNametxt.Text             = Hepsa.Core.Common.CurrentUser.User.UserName_nvc;
            }
            else
            {
                this.txtPrintedAgain.Visible = false;
                try
                {
                    TrafficKey.TrafficID_bint        = TrafficEntityrpt.TrafficID_bint;
                    TrafficEntityrpt.TurnPrinted_bit = true;
                    TrafficFactory.BeginProc();
                    TrafficFactory.Update(TrafficEntityrpt, TrafficKey);
                    TrafficFactory.CommitProc();
                }
                catch (Exception ex)
                {
                    TrafficFactory.RollBackProc();
                    throw ex;
                }
            }
        }
예제 #6
0
        public TrafficReport(HPS.BLL.TrafficBLL.BLLTraffic_T TrafficEntity)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();


            this.TrafficEntityrpt = TrafficEntity;

            InDateTextBox.Text = TrafficEntityrpt.Date_nvc;
            InTimeTextBox.Text = TrafficEntityrpt.Time_nvc;

            //InDatetext2Box.Text = TrafficEntityrpt.Date_nvc;
            //InTimetext2Box.Text = TrafficEntityrpt.Time_nvc;

            TrafficNumbertxt.Text = "شماره قبض :   " + TrafficEntityrpt.TrafficNumber_bint.ToString();
            //TrafficNumber2txt.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            //DriverName2txt.Text = " نام راننده : " + TrafficEntityrpt.FirstName_nvc + " " + TrafficEntityrpt.LastName_nvc;

            if (TrafficEntityrpt.ServiceID_int == 2)
            {
                if (TrafficEntityrpt.TurnAccepted_bit == true)
                {
                    //نوبت تأیید شده داره
                    TurnNumbertxt.Text = "شماره نوبت :   " + Convert.ToString(TrafficEntityrpt.AcceptedTurnNumber_bint);
                    //AcceptedDate2TextBox.Text = TrafficEntityrpt.TurnDate_nvc;
                    //AcceptedTime2TextBox.Text = TrafficEntityrpt.TurnTime_nvc;
                    //TurnNumber2txt.Text = TrafficEntityrpt.AcceptedTurnNumber_bint.ToString();
                }
                else
                {
                    //نوبت تأیید شده ندارد
                    TurnNumbertxt.Text = "شماره نوبت رزرو :   " + Convert.ToString(TrafficEntityrpt.TurnNumber_bint);
                }
            }
            else
            {
                // (عدم نمایش نوبت (مراجعه به غیر از نوبت

                TurnNumbertxt.Visible       = false;
                TurnNumberAllerttxt.Visible = false;
            }

            //DriverCardNumber2txt.Text = "شماره كارت راننده :" + TrafficEntityrpt.DriverCardNumber_nvc;
            //CarCardNumber2txt.Text = "شماره كارت كاميون :" + TrafficEntityrpt.CarCardNumber_nvc;


            HPS.BLL.ServicesBLL.BLLServices_TFactory servicesFactory = new HPS.BLL.ServicesBLL.BLLServices_TFactory();
            HPS.BLL.ServicesBLL.BLLServices_TKeys    ServicesKey     = new HPS.BLL.ServicesBLL.BLLServices_TKeys();
            ServicesKey.ServicesID_int = TrafficEntity.ServiceID_int;
            DateTextBox.Text           = servicesFactory.ServerJalaliDate;
            TimeTextBox.Text           = servicesFactory.ServerTime;
            HPS.BLL.ServicesBLL.BLLServices_T ServicesEntity = new HPS.BLL.ServicesBLL.BLLServices_T();
            ServicesEntity     = servicesFactory.GetBy(ServicesKey);
            Servicestxt.Text   = " قبض مراجعه به : " + ServicesEntity.ServicesType_nvc;
            DriverNametxt.Text = " نام راننده : " + TrafficEntityrpt.FirstName_nvc + " " + TrafficEntityrpt.LastName_nvc;
            HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory laderTypeFactory = new HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory();
            string LaderTypecondition = "[LaderType_T].[LaderTypeID_int]='" + TrafficEntityrpt.LaderTypeID_int + "'";
            List <HPS.BLL.LaderTypeBLL.BLLLaderType_T> LaderTypeLst = laderTypeFactory.GetAllByCondition(LaderTypecondition);

            if (LaderTypeLst != null)
            {
                CarTypetxt.Text = "نوع وسیله : " + TrafficEntityrpt.System_nvc + "-  " + LaderTypeLst[0].LaderType_nvc;
                //CarType2txt.Text = "نوع وسیله : " + TrafficEntityrpt.System_nvc + "-  " + LaderTypeLst[0].LaderType_nvc; //+ "- کد:" + LaderTypeLst[0].LaderTypeID_int.ToString() ;
            }
            HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory PlatecityFactory = new HPS.BLL.PlateCityBLL.BLLPlateCity_TFactory();
            HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys    Platecitykey     = new HPS.BLL.PlateCityBLL.BLLPlateCity_TKeys();
            Platecitykey.PlateCityID_int = TrafficEntityrpt.PlateCityID_int;
            HPS.BLL.PlateCityBLL.BLLPlateCity_T PlateCityEntity = new HPS.BLL.PlateCityBLL.BLLPlateCity_T();
            PlateCityEntity = PlatecityFactory.GetBy(Platecitykey);
            if (PlateCityEntity != null)
            {
                NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + PlateCityEntity.PlateCity_nvc + " " + TrafficEntityrpt.SerialPlate_nvc;
                //NumberPlate2txt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + PlateCityEntity.PlateCity_nvc + " " + TrafficEntityrpt.SerialPlate_nvc;
            }
            else
            {
                NumberPlatetxt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + TrafficEntityrpt.SerialPlate_nvc;
                //NumberPlate2txt.Text = "شماره پلاک : " + Hepsa.Core.Common.PersentationController.CorrectNumberPlate(TrafficEntityrpt.NumberPlate_nvc) + " - " + TrafficEntityrpt.SerialPlate_nvc;
            }
            if (TrafficEntityrpt.WithLade_bit == true)
            {
                WithLadetxt.Text = "وضعیت : " + "با بار" + "(" + TrafficEntityrpt.Comment_nvc + ") ";
            }
            else
            {
                WithLadetxt.Text = "وضعیت : " + "بدون بار";
            }
            HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory BillFactory = new HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory();
            if (TrafficEntityrpt.BillMessageID_int == 0 || TrafficEntityrpt.BillMessageID_int == null)
            {
            }
            else
            {
                string Billcondition = "[BillMessage_T].[BillMessageID_int]=" + TrafficEntityrpt.BillMessageID_int;
                List <HPS.BLL.BillMessageBLL.BLLBillMessage_T> BillLst = BillFactory.GetAllByCondition(Billcondition);
                if (BillLst != null)
                {
                    Messagetxt.Text = BillLst[0].Message_nvc;
                }
            }
            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox();
            txt.DigitsInGroup = 3;
            if (TrafficEntityrpt.Price_dec != null)
            {
                txt.Text      = TrafficEntityrpt.Price_dec.ToString();
                Pricetxt.Text = " مبلغ دریافتی هنگام ورود " + txt.Text + "  ريا ل می باشد";
            }

            HPS.BLL.SettingsBLL.BLLSetting_TFactory settingsFactory = new HPS.BLL.SettingsBLL.BLLSetting_TFactory();
            HPS.BLL.SettingsBLL.BLLSetting_T        SettingEntity   = new HPS.BLL.SettingsBLL.BLLSetting_T();
            HPS.BLL.SettingsBLL.BLLSetting_TKeys    SettingKey      = new HPS.BLL.SettingsBLL.BLLSetting_TKeys();
            SettingKey.SettingID_int = 1002;
            SettingEntity            = settingsFactory.GetBy(SettingKey);
            if (TrafficEntityrpt.ServiceID_int == 2)
            {
                AllowableHourtxt.Text = SettingEntity.Value_nvc; //TrafficEntityrpt.AllowableHour_int.ToString();
            }
            else
            {
                AllowableHourtxt.Text = TrafficEntityrpt.AllowableHour_int.ToString();
            }
            txt.Text          = TrafficEntityrpt.Fee_dec.ToString();
            Feetxt.Text       = txt.Text;
            ExtraHourtxt.Text = TrafficEntityrpt.ExtraHour_int.ToString();
            //if (TrafficEntityrpt.WithFlat_bit==true)
            //{
            //txt.Text = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            //}
            txt.Text                  = TrafficEntityrpt.ExtraHourFee_dec.ToString();
            ExtraHourFeetxt.Text      = txt.Text;
            UserNametxt.Text          = TrafficEntityrpt.UserName_nvc;
            TrafficNumberbarcode.Text = TrafficEntityrpt.TrafficNumber_bint.ToString();
            if (TrafficEntityrpt.TurnHour_int != null)
            {
                TurnNumberAllerttxt.Text = " شماره نوبت شما رزرو می باشد لطفاً تا " + TrafficEntityrpt.TurnHour_int.ToString() + " ساعت نسبت به تأیید آن اقدام نمایید";
            }
            if (TrafficEntityrpt.Printed_bit == true)
            {
                this.txtPrintedAgain.Visible = true;
            }
            else
            {
                this.txtPrintedAgain.Visible = false;
                HPS.BLL.TrafficBLL.BLLTraffic_TFactory TrafficFactory = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
                try
                {
                    HPS.BLL.TrafficBLL.BLLTraffic_TKeys TrafficKey = new HPS.BLL.TrafficBLL.BLLTraffic_TKeys();
                    TrafficKey.TrafficID_bint    = TrafficEntityrpt.TrafficID_bint;
                    TrafficEntityrpt.Printed_bit = true;
                    TrafficFactory.BeginProc();
                    TrafficFactory.Update(TrafficEntityrpt, TrafficKey);
                    TrafficFactory.CommitProc();
                }
                catch (Exception ex)
                {
                    TrafficFactory.RollBackProc();
                    throw ex;
                }
            }
        }
예제 #7
0
        public LadBillReport(Int32 LadBillCreditID, int again)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TFactory LadBillCreditFactory = new HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TFactory();
            HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TKeys    LadBillKey           = new HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TKeys();
            LadBillKey.LadBillCreditID_int = LadBillCreditID;
            DataTable LadBillLadeAssignmentDataTable = new DataTable();

            LadBillCreditFactory.GetAllLadeAssignment(LadBillKey, ref LadBillLadeAssignmentDataTable);
            if (!string.IsNullOrEmpty(LadBillLadeAssignmentDataTable.Rows[0]["DriverCardNumber_nvc"].ToString()))
            {
                DriverCardNumebrtxt.Text = " کارت هوشمند راننده: " + LadBillLadeAssignmentDataTable.Rows[0]["DriverCardNumber_nvc"].ToString();
            }
            else
            {
                DriverCardNumebrtxt.Text = " کارت هوشمند راننده:فاقد كارت ";
            }
            if (!string.IsNullOrEmpty(LadBillLadeAssignmentDataTable.Rows[0]["CarCardNumber_nvc"].ToString()))
            {
                CarCardNumbertxt.Text = " کارت هوشمند کامیون : " + LadBillLadeAssignmentDataTable.Rows[0]["CarCardNumber_nvc"].ToString();
            }
            else
            {
                CarCardNumbertxt.Text = " کارت هوشمند کامیون :فاقد كارت ";
            }

            DriverMobileNumber_nvctxt.Text = string.Format("موبایل راننده: {0}", LadBillLadeAssignmentDataTable.Rows[0]["DriverMobileNumber_nvc"].ToString());
            Companytxt.Text       = LadBillLadeAssignmentDataTable.Rows[0]["CompanyID_intCompany_nvc"].ToString() + "(" + LadBillLadeAssignmentDataTable.Rows[0]["CompanyCode_nvc"].ToString() + ")" + "(" + LadBillLadeAssignmentDataTable.Rows[0]["Phone_nvc"].ToString() + ")";                                         //Cmp_nvc
            LaderTypetxt.Text     = LadBillLadeAssignmentDataTable.Rows[0]["LaderTypeID_intLaderType_nvc"].ToString();
            Boxingtxt.Text        = LadBillLadeAssignmentDataTable.Rows[0]["BoxingID_intBoxingType_nvc"].ToString();                                                                                                                                                                                                       //LaderType
            NumberPlatetxt.Text   = Hepsa.Core.Common.PersentationController.CorrectNumberPlate(LadBillLadeAssignmentDataTable.Rows[0]["NumberPlate_nvc"].ToString()) + " - " + LadBillLadeAssignmentDataTable.Rows[0]["PlateCity_nvc"].ToString() + LadBillLadeAssignmentDataTable.Rows[0]["SerialPlate_nvc"].ToString(); //Plaque
            DriverNametxt.Text    = LadBillLadeAssignmentDataTable.Rows[0]["DriverName"].ToString();                                                                                                                                                                                                                       //Driver
            LicenceNumbertxt.Text = LadBillLadeAssignmentDataTable.Rows[0]["licenceNumber_int"].ToString();                                                                                                                                                                                                                //LicenceNumber
            LicenceCitytxt.Text   = LadBillLadeAssignmentDataTable.Rows[0]["LicenceCityID_intCity_nvc"].ToString();                                                                                                                                                                                                        //LicenceCity
            Goodtxt.Text          = LadBillLadeAssignmentDataTable.Rows[0]["GoodID_intGood_nvc"].ToString();                                                                                                                                                                                                               //Good
            LadingDatetxt.Text    = LadBillLadeAssignmentDataTable.Rows[0]["LadingDate_nvc"].ToString();                                                                                                                                                                                                                   //
            Destinationtxt.Text   = LadBillLadeAssignmentDataTable.Rows[0]["CityID_intCity_nvc"].ToString() + "-" + LadBillLadeAssignmentDataTable.Rows[0]["Address_nvc"].ToString();
            HamrahanSystem.TextBox.NumericTextBox txt = new HamrahanSystem.TextBox.NumericTextBox();
            txt.DigitsInGroup         = 3;
            txt.Text                  = LadBillLadeAssignmentDataTable.Rows[0]["PortageFee_dec"].ToString();
            PortageFeetxt.Text        = txt.Text;
            Commenttxt.Text           = LadBillLadeAssignmentDataTable.Rows[0]["AssignmentComment_nvc"].ToString();
            Datetxt.Text              = LadBillLadeAssignmentDataTable.Rows[0]["LadBillDate"].ToString();
            Timetxt.Text              = LadBillLadeAssignmentDataTable.Rows[0]["LadBillTime"].ToString();
            TurnNumbertxt.Text        = LadBillLadeAssignmentDataTable.Rows[0]["AcceptedTurnNumber_bint"].ToString();
            LadBillNumbertxt.Text     = LadBillLadeAssignmentDataTable.Rows[0]["LadBillCreditID_int"].ToString();
            UserNametxt.Text          = LadBillLadeAssignmentDataTable.Rows[0]["LadBillUser"].ToString();
            PortPlacetxt.Text         = LadBillLadeAssignmentDataTable.Rows[0]["PortPlaceID_intPortPlaces_nvc"].ToString();
            MinWeightTextBox.Text     = "از وزن: " + LadBillLadeAssignmentDataTable.Rows[0]["MinWeight_dec"].ToString();
            MaxWeightTextBox.Text     = "تا وزن: " + LadBillLadeAssignmentDataTable.Rows[0]["MaxWeight_dec"].ToString();
            TrafficNumberTextBox.Text = LadBillLadeAssignmentDataTable.Rows[0]["TrafficNumber_bint"].ToString();

            HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory BillMessage_TFactory = new HPS.BLL.BillMessageBLL.BLLBillMessage_TFactory();
            List <HPS.BLL.BillMessageBLL.BLLBillMessage_T> BillMessage_TList    = new List <HPS.BLL.BillMessageBLL.BLLBillMessage_T>();
            string Condition = string.Format("TrafficType_T.TrafficTypeID_int=9 AND [BillMessage_T].StartDate_nvc<='{0}' AND [BillMessage_T].[EndDate_nvc]>='{0}' ", BillMessage_TFactory.ServerJalaliDate);

            BillMessage_TList = BillMessage_TFactory.GetAllByCondition(Condition);
            if (BillMessage_TList != null && BillMessage_TList.Count > 0)
            {
                BillMessageTextBox.Text = BillMessage_TList[0].Message_nvc;
            }
            if (again != 1)
            {
                if (LadBillLadeAssignmentDataTable.Rows[0]["LadeDate"].ToString().CompareTo(LadBillCreditFactory.ServerJalaliDate) < 0)
                {
                    RemaintextBox.Visible = true;
                }
                else
                {
                    RemaintextBox.Visible = false;
                }
            }

            AgainDatetxt.Text = LadBillCreditFactory.ServerJalaliDate;
            AgainTimetxt.Text = LadBillCreditFactory.ServerTime;
            if (again == 1)
            {
                Againtxt.Visible     = true;
                txtDate.Visible      = true;
                AgainDatetxt.Visible = true;
                txtTime.Visible      = true;
                AgainTimetxt.Visible = true;
                txtuser.Visible      = true;
                AgainUsertxt.Visible = true;
                AgainUsertxt.Text    = HPS.Common.CurrentUser.user.UserName_nvc;
            }
        }