Ejemplo n.º 1
0
        private void reloadOwnerByPlate(string plate)
        {
            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult = lOwner.searchOwnerByPlate(plate);

            if (opResult.status == BaseDAL.Base.EnumCommandStatus.success)
            {
                DataTable result = opResult.model as DataTable;
                UserControls.OwnerUserControl owner = new UserControls.OwnerUserControl(result);
                ownerTabPage.Controls.Add(owner);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reload
        /// </summary>
        private void reload()
        {
            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult = lOwner.loadViewOwner();

            resultGrid.DataSource = opResult.model;
            resultGrid.loadHeader(this.GetType().Name);

            //Plate type
            //Common.BLL.Logic.GasStation.Base__PlateType		lPlateType		= new Common.BLL.Logic.GasStation.Base__PlateType (Common.Enum.EDatabase.GasStation);
            //DataTable	resultPlateType		= lPlateType.allData("", "", false).model as DataTable;
            //plateTypeComboBox.fillByTable (resultPlateType, "id", "type");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Report Customer Menu Item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ReportCustomerMenuItem_Click(object sender, EventArgs e)
        {
            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult   = lOwner.loadReportOwner();
            DataTable     result     = opResult.model as DataTable;
            StiReport     mainreport = new StiReport();

            mainreport.RegBusinessObject("owner", result);
            mainreport.Load(Application.StartupPath + "\\Reports\\owner.mrt");
            mainreport.Compile();
            mainreport["myDate"] = ExtensionsDateTime.toPersianDate(DateTime.Now);
            mainreport.Render();
            mainreport.Show();
        }
Ejemplo n.º 4
0
        private void reloadData()
        {
            Common.BLL.Entity.GasStation.Owner model = new Common.BLL.Entity.GasStation.Owner()
            {
                nationalCode = nationalCodeMaskedTextBox.Text.Trim()
            };
            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult = lOwner.read(model, "nationalCode");

            if (opResult.status == BaseDAL.Base.EnumCommandStatus.success)
            {
                searchGrid.DataSource = opResult.model;
                searchGrid.loadHeader("CustomerViewForm_Search");
            }
        }
Ejemplo n.º 5
0
        private void reloadOwnerByNationalcode(string natioanlcode)
        {
            Common.BLL.Entity.GasStation.Owner model = new Common.BLL.Entity.GasStation.Owner()
            {
                nationalCode = natioanlcode
            };
            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult = lOwner.read(model, "nationalCode");

            if (opResult.status == BaseDAL.Base.EnumCommandStatus.success)
            {
                UserControls.OwnerUserControl owner = new UserControls.OwnerUserControl(opResult.model);
                ownerTabPage.Controls.Add(owner);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Prepare
        /// </summary>
        private void prepare()
        {
            model = new Common.BLL.Entity.GasStation.Owner()
            {
                nationalCode = nationalcode
            };
            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult = lOwner.read(model, "nationalCode");

            if (opResult.status == BaseDAL.Base.EnumCommandStatus.success)
            {
                // Fill Controls
                BaseBLL.General.FormModelHelper <Common.BLL.Entity.GasStation.Owner> .fillControl(ownerDataGroupBox, model);

                birthdateLabel.Text = Convert.ToDateTime(model.birthdate).ToString("yyyy/MM/dd");
            }
        }
Ejemplo n.º 7
0
        private bool deleteOwner(int ownerId)
        {
            bool result = false;


            Common.BLL.Entity.GasStation.Owner model = new Common.BLL.Entity.GasStation.Owner()
            {
                id = ownerId
            };

            Common.BLL.Logic.GasStation.Owner lOwner = new Common.BLL.Logic.GasStation.Owner(Common.Enum.EDatabase.GasStation);
            CommandResult opResult = lOwner.delete(model);

            if (opResult.status == BaseDAL.Base.EnumCommandStatus.success)
            {
                result = true;
            }

            return(result);
        }