Пример #1
0
        private void InitializationProperties(DataRow row)
        {
            if (row == null)
            {
                return;
            }
            JobId = MyConvert.ConvertToInteger(row["jobID"]);

            WorkedHour      = MyConvert.ConvertToDouble(row["workedHour"]);
            FinishedDate    = MyConvert.ConvertToDate(row["FinishedDate"]);
            NumberOfDrawing = MyConvert.ConvertToInteger(row["NumberOfDrawing"]);
            Note            = MyConvert.ConvertToString(row["Note"]);
        }
        private void InitializeCreateData(DateTime?issueDateTime = null)
        {
            //3 fields from UI: RequiredTime, SubmitBy and Description
            if (DrawingType.Trim() == "Graphic")
            {
                TaskType    = 501;
                RequestType = "job";
                Status      = 501;
                Responsible = (short)SpecDomain.BO.SpecConfiguration.GRAPHIC_DRAWING_EID;
            }
            else
            {
                TaskType    = 551;
                RequestType = "job";
                Status      = 551;
                Responsible = (short)SpecDomain.BO.SpecConfiguration.STRUCTURAL_DRAWING_EID;
            }

            var est = _db.Sales_JobMasterList_EstRev.Find(EstRevID);

            JobID = est.JobID;

            var reqTitle = est.Sales_Dispatching_DrawingRequisition_Estimation.First();

            Subject = reqTitle.Sales_Dispatching_DrawingReq_Purpose.dpName;

            if (issueDateTime == null)
            {
                SubmitTime = DateTime.Now;
            }
            else
            {
                SubmitTime = issueDateTime.Value;
            }
            LastUpdateTime = DateTime.Now;
            RequiredTime   = MyConvert.ConvertToDate(FormatedRequiredTime);


            Rush = GetRush();

            //No-Use
            QuoteRevID        = 0;
            WoID              = 0;
            InvoiceID         = 0;
            Priority          = 0;
            Importance        = 0;
            OwnerFinish       = false;
            ResponsibleFinish = false;
            IncompleteInfo    = false;
        }
        private void InitializeCreateData(DateTime?issueDateTime = null)
        {
            //3 fields from UI: RequiredTime, SubmitBy and Description

            TaskType    = 201;
            RequestType = "job";
            Subject     = "Estimation";
            Status      = 201;

            var est = _db.Sales_JobMasterList_EstRev.Find(EstRevID);

            JobID = est.JobID;

            //By Configuration
            //
            if (issueDateTime == null)
            {
                SubmitTime = DateTime.Now;
            }
            else
            {
                SubmitTime = issueDateTime.Value;
            }
            LastUpdateTime = DateTime.Now;
            RequiredTime   = MyConvert.ConvertToDate(FormatedRequiredTime);

            Rush = GetRush();

            //No-Use
            QuoteRevID        = 0;
            WoID              = 0;
            InvoiceID         = 0;
            Priority          = 0;
            Importance        = 0;
            OwnerFinish       = false;
            ResponsibleFinish = false;
            IncompleteInfo    = false;
        }