Пример #1
0
        private ServiceCame GetFormData()
        {
            ServiceCame serviceCame = new ServiceCame
            {
                //Id = Id,
                IdServiceClaim = MainHelper.LbGetSelectedValueInt(ref lbClaim),
                IdServiceActionType = MainHelper.DdlGetSelectedValueInt(ref ddlServiceActionType),
                IdServiceEngeneer = MainHelper.DdlGetSelectedValueInt(ref ddlServiceEngeneer),
                DateCame = MainHelper.TxtGetTextDateTime(ref txtDateCame),
                Counter = MainHelper.TxtGetTextInt32(ref txtCounter),
                Descr = MainHelper.TxtGetText(ref txtDescr),
                IdCreator = User.Id,
                CounterColour = MainHelper.TxtGetTextInt32(ref txtCounterColour, true),
                NoPay = MainHelper.RblGetValueBool(ref rblNoPay),
                ProcessEnabled = MainHelper.RblGetValueBool(ref rblProcessEnabled),
                DeviceEnabled = MainHelper.RblGetValueBool(ref rblDeviceEnabled),
                NeedZip = MainHelper.RblGetValueBool(ref rblNeedZip),
                NoCounter = MainHelper.RblGetValueBool(ref rblNoCounter),
                CounterUnavailable = MainHelper.RblGetValueBool(ref rblCounterUnavailable),
                ZipDescr = MainHelper.TxtGetText(ref txtZipDescr),
                DateWorkStart = MainHelper.TxtGetText(ref txtDateWorkStart),
                DateWorkEnd = MainHelper.TxtGetText(ref txtDateWorkEnd)
            };

            return serviceCame;
        }
Пример #2
0
        private void FillFormData(ServiceCame serviceCame)
        {
            ServiceClaim serviceClaim = new ServiceClaim(serviceCame.IdServiceClaim);

            FormTitle = String.Format("Отметка об обслуживании заявки №{0}", serviceClaim.Number);

            if (Id > 0)
            {
                FillClaimList(null, serviceCame.Id);
                MainHelper.TxtSetText(ref txtClaimSelection, String.Empty, false);
            }

            MainHelper.LbSetSelectedValue(ref lbClaim, serviceCame.IdServiceClaim);

            SetDateCaberBorder(serviceClaim.PlaningDate.Value);

            MainHelper.DdlSetSelectedValue(ref ddlServiceActionType, serviceCame.IdServiceActionType);
            MainHelper.DdlSetSelectedValue(ref ddlServiceEngeneer, serviceCame.IdServiceEngeneer);
            MainHelper.TxtSetText(ref txtCounter, serviceCame.Counter);
            MainHelper.TxtSetText(ref txtCounterColour, serviceCame.CounterColour);
            MainHelper.TxtSetDate(ref txtDateCame, serviceCame.DateCame);
            MainHelper.TxtSetText(ref txtDescr, serviceClaim.Descr);
            MainHelper.RblSetValue(ref rblProcessEnabled, serviceCame.ProcessEnabled);
            MainHelper.RblSetValue(ref rblDeviceEnabled, serviceCame.DeviceEnabled);
            MainHelper.RblSetValue(ref rblNeedZip, serviceCame.NeedZip);
            MainHelper.RblSetValue(ref rblNoCounter, serviceCame.NoCounter);
            MainHelper.RblSetValue(ref rblCounterUnavailable, serviceCame.CounterUnavailable);
            MainHelper.RblSetValue(ref rblNoPay, serviceCame.NoPay);
            MainHelper.TxtSetText(ref txtZipDescr, serviceCame.ZipDescr);
            MainHelper.TxtSetText(ref txtDateWorkStart, serviceCame.DateWorkStart);
            MainHelper.TxtSetText(ref txtDateWorkEnd, serviceCame.DateWorkEnd);
        }
Пример #3
0
        protected new void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!IsPostBack)
            {
                FormTitle = "Отметка об обслуживании заявки";

                if (Id > 0)
                {
                    ServiceCame serviceCame = new ServiceCame(Id);
                    FillFormData(serviceCame);
                }
                else if (IdClaim > 0)
                {
                    FillClaimList(null, null, IdClaim);
                    if (lbClaim.Items.Count > 0)
                    {
                        lbClaim.Items[0].Selected = true;
                    }
                }

            }

            RegisterStartupScripts();
        }
Пример #4
0
        private ServiceCame GetFormData()
        {
            int idAktScan;

            int.TryParse(imgAktScan.Attributes["IdAktScan"].ToString(), out idAktScan);

            ServiceCame serviceCame = new ServiceCame
            {
                //Id = Id,
                IdServiceClaim = MainHelper.LbGetSelectedValueInt(ref lbClaim),
                IdServiceActionType = MainHelper.DdlGetSelectedValueInt(ref ddlServiceActionType),
                IdServiceEngeneer = MainHelper.DdlGetSelectedValueInt(ref ddlServiceEngeneer),
                DateCame = MainHelper.TxtGetTextDateTime(ref txtDateCame),
                Counter = MainHelper.TxtGetTextInt32(ref txtCounter),
                //Descr = MainHelper.TxtGetText(ref txtDescr),
                IdCreator = User.Id,
                CounterColour = MainHelper.TxtGetTextInt32(ref txtCounterColour, true),
                IdAktScan = idAktScan
            };

            return serviceCame;
        }
Пример #5
0
        private void FillFormData(ServiceCame serviceCame)
        {
            ServiceClaim serviceClaim = new ServiceClaim(serviceCame.IdServiceClaim);

            FormTitle = String.Format("Отметка об обслуживании заявки №{0}", serviceClaim.Number);

            if (Id > 0)
            {
                FillClaimList(null, serviceCame.Id);
                MainHelper.TxtSetText(ref txtClaimSelection, String.Empty, false);
            }

            MainHelper.LbSetSelectedValue(ref lbClaim, serviceCame.IdServiceClaim);

            SetDateCaberBorder(serviceClaim.PlaningDate.Value);

            MainHelper.DdlSetSelectedValue(ref ddlServiceActionType, serviceCame.IdServiceActionType);
            MainHelper.DdlSetSelectedValue(ref ddlServiceEngeneer, serviceCame.IdServiceEngeneer);
            MainHelper.TxtSetText(ref txtCounter, serviceCame.Counter);
            MainHelper.TxtSetText(ref txtCounterColour, serviceCame.CounterColour);
            MainHelper.TxtSetDate(ref txtDateCame, serviceCame.DateCame);
            //MainHelper.TxtSetText(ref txtDescr, serviceClaim.Descr);
        }
Пример #6
0
        protected new void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!IsPostBack)
            {
                FormTitle = "Отметка об обслуживании заявки";

                if (Id > 0)
                {
                    ServiceCame serviceCame = new ServiceCame(Id);
                    FillFormData(serviceCame);
                }
            }

            RegisterStartupScripts();
        }