예제 #1
0
 private void DataPortal_Fetch(string plctaskno)
 {
     using (BypassPropertyChecks)
     {
         using (var cn = new MySqlConnection(AppUtil._LocalConnectionString))
         {
             cn.Open();
             using (var cm = cn.CreateCommand())
             {
                 cm.CommandText =
                     "SELECT * FROM T_SORTING_LINE_TASK_ABNORMAL t  WHERE t.indexno = @plctaskno limit 1";
                 cm.Parameters.AddWithValue("@plctaskno", Convert.ToInt32(plctaskno));
                 using (var dr = new SafeDataReader(cm.ExecuteReader()))
                 {
                     while (dr.Read())
                     {
                         LoadProperty(IdProperty, dr.GetString("ID"));
                         LoadProperty(SORTINGTASKNOProperty, dr.GetString("SORTINGTASKNO"));
                         LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
                         LoadProperty(PICKLINECODEProperty, dr.GetString("PICKLINECODE"));
                         LoadProperty(PICKLINENAMEProperty, dr.GetString("PICKLINENAME"));
                         LoadProperty(CUSTCODEProperty, dr.GetString("CUSTCODE"));
                         LoadProperty(CUSTNAMEProperty, dr.GetString("CUSTNAME"));
                         LoadProperty(INDEXNOProperty, dr.GetInt32("INDEXNO"));
                         LoadProperty(OUTPORTProperty, dr.GetString("OUTPORT"));
                         LoadProperty(StatusProperty, dr.GetInt32("Status"));
                         LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
                         LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
                     }
                 }
             }
         }
     }
 }
예제 #2
0
 private void DataPortal_Fetch(SingleCriteria <SortingTaskProgress, string> criteria)
 {
     using (BypassPropertyChecks)
     {
         using (var cn = new MySqlConnection(AppUtil._LocalConnectionString))
         {
             cn.Open();
             using (var cm = cn.CreateCommand())
             {
                 cm.CommandText =
                     "SELECT * FROM T_SORTING_Line_TASK WHERE id = @id";
                 cm.Parameters.AddWithValue("@id", criteria.Value);
                 using (var dr = new SafeDataReader(cm.ExecuteReader()))
                 {
                     dr.Read();
                     LoadProperty(STATUSProperty, dr.GetInt32("STATUS"));
                     LoadProperty(PLCAddressProperty, dr.GetInt32("plcaddress"));
                     LoadProperty(SORTINGTIMEProperty, dr.GetDateTime("SORTINGTIME"));
                     LoadProperty(FINISHTIMEProperty, dr.GetDateTime("FINISHTIME"));
                     LoadProperty(IdProperty, dr.GetString("Id"));
                 }
             }
         }
     }
 }
예제 #3
0
        internal CigBoxInfo(SafeDataReader dr)
        {
            ID            = dr.GetString("ID");
            SORTINGTASKNO = dr.GetString("SORTINGTASKNO");
            ORDERDATE     = dr.GetString("ORDERDATE");
            BOXCODE       = dr.GetString("BOXCODE");
            CUSTOMERNO    = dr.GetString("CUSTOMERNO");
            CUSTOMERName  = dr.GetString("custname");
            LINECODE      = dr.GetString("LINECODE");
            LINEID        = dr.GetString("LINEID");
            BOXCOUNT      = dr.GetInt32("BOXCOUNT");
            BOXQTY        = dr.GetInt32("BOXQTY");
            STATUS        = dr.GetInt32("STATUS");
            SORTINGTIME   = dr.GetDateTime("SORTINGTIME");
            FINISHTIME    = dr.GetDateTime("FINISHTIME");
            LineName      = dr.GetString("LineName");
            CorpName      = dr.GetString("CorpName");
            BOXSEQ        = dr.GetInt32("BOXSEQ");
            IndexNO       = dr.GetInt32("IndexNO");

            try
            {
                AbnoCount = dr.GetInt32("AbnoCount");
            }
            catch (Exception)
            {
            }
            try
            {
                Address = dr.GetString("address");
            }
            catch (Exception)
            {
            }
        }
예제 #4
0
 private void FillSelf(SafeDataReader reader)
 {
     this.Id = reader.GetInt32(IdProperty.FriendlyName);
     this.TapMangoPlantId    = reader.GetInt32(TapMangoPlantIdProperty.FriendlyName);
     this.StatusId           = reader.GetInt32(StatusIdProperty.FriendlyName);
     this.StartTime          = reader.GetDateTime(StartTimeProperty.FriendlyName);
     this.ExpectToCompleteOn = reader.GetDateTime(ExpectToCompleteOnProperty.FriendlyName);
     this.CreatedOn          = reader.GetDateTime(CreatedOnProperty.FriendlyName);
 }
예제 #5
0
파일: TicketType.cs 프로젝트: awancilik/CRM
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     SetProperty(idTicketTypeProperty, dr.GetInt32(0));
     SetProperty(TicketTypeNameProperty, dr.GetString(1));
     SetProperty(TicketDescProperty, dr.GetString(2));
     SetProperty(CreatedByProperty, dr.GetString(3));
     SetProperty(CreatedDateProperty, dr.GetDateTime(4));
     SetProperty(UpdatedByProperty, dr.GetString(5));
     SetProperty(UpdatedDateProperty, dr.GetDateTime(6));
 }
예제 #6
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(IdDivisionProperty, dr.GetInt32(0));
     LoadProperty(DivisionNameProperty, dr.GetString(1));
     LoadProperty(DivisionDescProperty, dr.GetString(2));
     LoadProperty(CreatedByProperty, dr.GetString(3));
     LoadProperty(CreatedDateProperty, dr.GetDateTime(4));
     LoadProperty(UpdatedByProperty, dr.GetString(5));
     LoadProperty(UpdatedDateProperty, dr.GetDateTime(6));
 }
예제 #7
0
        private void DataPortal_Fetch(string plctaskno)
        {
            using (BypassPropertyChecks)
            {
                using (var cn = new MySqlConnection(AppUtil._LocalConnectionString))
                {
                    cn.Open();
                    using (var cm = cn.CreateCommand())
                    {
                        cm.CommandText =
                            "SELECT * FROM T_SORTING_LINE_TASK t WHERE t.indexno = @plctaskno limit 1";
                        cm.Parameters.AddWithValue("@plctaskno", Convert.ToInt32(plctaskno));
                        using (var dr = new SafeDataReader(cm.ExecuteReader()))
                        {
                            while (dr.Read())
                            {
                                LoadProperty(IdProperty, dr.GetString("ID"));
                                LoadProperty(SORTINGTASKNOProperty, dr.GetString("SORTINGTASKNO"));
                                LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
                                LoadProperty(PICKLINECODEProperty, dr.GetString("PICKLINECODE"));
                                LoadProperty(PICKLINENAMEProperty, dr.GetString("PICKLINENAME"));
                                LoadProperty(CUSTCODEProperty, dr.GetString("CUSTCODE"));
                                LoadProperty(CUSTNAMEProperty, dr.GetString("CUSTNAME"));
                                LoadProperty(INDEXNOProperty, dr.GetInt32("INDEXNO"));
                                LoadProperty(OUTPORTProperty, dr.GetString("OUTPORT"));
                                LoadProperty(LINECODEProperty, dr.GetString("LINECODE"));
                                LoadProperty(LINENAMEProperty, dr.GetString("LINENAME"));
                                LoadProperty(CORPCODEProperty, dr.GetString("CORPCODE"));
                                LoadProperty(CORPNAMEProperty, dr.GetString("CORPNAME"));
                                LoadProperty(ShortNameProperty, dr.GetString("ShortName"));
                                LoadProperty(PLCADDRESSProperty, dr.GetInt32("PLCADDRESS"));
                                LoadProperty(ISLOCKProperty, dr.GetInt32("islock"));
                                LoadProperty(StatusProperty, dr.GetInt32("Status"));
                                LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
                                LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
                            }
                        }

                        // load child objects
                        using (var cmProducts = cn.CreateCommand())
                        {
                            cmProducts.CommandText =
                                "SELECT * FROM T_SORTING_LINE_DETAIL_TASK tl WHERE tl.taskid =  @id order by tl.LINEBOXNAME";
                            cmProducts.Parameters.AddWithValue("@id", ID);
                            using (var drTaskDetails = new SafeDataReader(cmProducts.ExecuteReader()))
                            {
                                LoadProperty(SortingLineTaskDetailsProperty,
                                             SortingLineTaskDetails.GetSortingLineTaskDetails(drTaskDetails));
                            }
                        }
                    }
                }
            }
        }
예제 #8
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(idticketypedetailProperty, dr.GetInt32(0));
     LoadProperty(idTicketTypeProperty, dr.GetInt32(1));
     LoadProperty(TicketTypeNameProperty, dr.GetString(2));
     LoadProperty(TicketDescProperty, dr.GetString(3));
     LoadProperty(CreatedByProperty, dr.GetString(4));
     LoadProperty(CreatedDateProperty, dr.GetDateTime(5));
     LoadProperty(UpdatedByProperty, dr.GetString(6));
     LoadProperty(UpdatedDateProperty, dr.GetDateTime(7));
 }
예제 #9
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(idCustomerProperty, dr.GetInt64(0));
     LoadProperty(CustNoProperty, dr.GetString(1));
     LoadProperty(FirstNameProperty, dr.GetString(2));
     LoadProperty(LastNameProperty, dr.GetString(3));
     LoadProperty(EmailProperty, dr.GetString(4));
     LoadProperty(CompanyNameProperty, dr.GetString(5));
     LoadProperty(CreatedByProperty, dr.GetString(6));
     LoadProperty(CreatedDateProperty, dr.GetDateTime(7));
     LoadProperty(UpdatedByProperty, dr.GetString(8));
     LoadProperty(UpdatedDateProperty, dr.GetDateTime(9));
 }
예제 #10
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(idCustAgentProperty, dr.GetString(0));
     LoadProperty(CustAgentNameProperty, dr.GetString(1));
     LoadProperty(AgentDescProperty, dr.GetString(2));
     LoadProperty(SPVIDProperty, dr.GetString(3));
     LoadProperty(GroupNameProperty, dr.GetString(4));
     LoadProperty(IsSupervisorProperty, dr.GetBoolean(5));
     LoadProperty(CreatedByProperty, dr.GetString(6));
     LoadProperty(CreatedDateProperty, dr.GetDateTime(7));
     LoadProperty(UpdatedByProperty, dr.GetString(8));
     LoadProperty(UpdatedDateProperty, dr.GetDateTime(9));
 }
예제 #11
0
        public QccustomerlibraryModelList GetModelList(QccustomerlibraryModel model)
        {
            QccustomerlibraryTable table = new QccustomerlibraryTable();
            QcmaininfoTable        main  = new QcmaininfoTable();
            SelectSqlSection       sql   = DataAccess.DefaultDB.Select(table, table.AllColumns(), main.Status);

            sql.Join(main, table.QualityCode == main.QualityCode);
            if (model.QualityCode != "")
            {
                sql.Where(table.QualityCode == model.QualityCode);
            }

            using (SafeDataReader sdr = new SafeDataReader(sql.ToDataReader()))
            {
                QccustomerlibraryModelList result = new QccustomerlibraryModelList();
                while (sdr.Read())
                {
                    QccustomerlibraryModel m = new QccustomerlibraryModel();
                    m.Status            = sdr.GetString(main.Status);
                    m.QualityCode       = sdr.GetString(table.QualityCode);
                    m.BuyerId           = sdr.GetString(table.BuyerId);
                    m.Brand             = sdr.GetString(table.Brand);
                    m.CustomerQualityId = sdr.GetString(table.CustomerQualityId);
                    m.Sales             = sdr.GetString(table.Sales);
                    m.SalesGroup        = sdr.GetString(table.SalesGroup);
                    m.MillComments      = sdr.GetString(table.MillComments);
                    m.IsFirstOwner      = sdr.GetString(table.IsFirstOwner);
                    m.CreateDate        = sdr.GetDateTime(table.CreateDate);
                    m.Creator           = sdr.GetString(table.Creator);
                    result.Add(m);
                }
                return(result);
            }
        }
예제 #12
0
        public QC_HF_ChangeLogModelList GetModelList(string qualityCode)
        {
            QC_HF_ChangeLogTable table = new QC_HF_ChangeLogTable();
            SelectSqlSection     sql   = DataAccess.DefaultDB.Select(table, table.AllColumns());

            if (qualityCode != "")
            {
                sql.Where(table.QUALITY_CODE == qualityCode);
            }
            using (SafeDataReader sdr = new SafeDataReader(sql.ToDataReader()))
            {
                QC_HF_ChangeLogModelList result = new QC_HF_ChangeLogModelList();
                while (sdr.Read())
                {
                    QC_HF_ChangeLogModel m = new QC_HF_ChangeLogModel();
                    m.QualityCode    = sdr.GetString(table.QUALITY_CODE);
                    m.QC_Ref_PPO_Old = sdr.GetString(table.QC_Ref_PPO_Old);
                    m.QC_Ref_GP_Old  = sdr.GetString(table.QC_Ref_GP_Old);
                    m.HF_Ref_PPO_Old = sdr.GetString(table.HF_Ref_PPO_Old);
                    m.HF_Ref_GP_Old  = sdr.GetString(table.HF_Ref_GP_Old);
                    m.QC_Ref_PPO_New = sdr.GetString(table.QC_Ref_PPO_New);
                    m.QC_Ref_GP_New  = sdr.GetString(table.QC_Ref_GP_New);
                    m.HF_Ref_PPO_New = sdr.GetString(table.HF_Ref_PPO_New);
                    m.HF_Ref_GP_New  = sdr.GetString(table.HF_Ref_GP_New);
                    m.CreateDate     = sdr.GetDateTime(table.CREATE_DATE);
                    m.Creator        = sdr.GetString(table.CREATOR);

                    result.Add(m);
                }
                return(result);
            }
        }
예제 #13
0
        protected void Fetch(SafeDataReader sdr)
        {
            using (BypassPropertyChecks)
            {
                int i = 0;
                LoadProperty(UserIDProperty, sdr.GetInt32(i++));
                LoadProperty(FirstNameProperty, sdr.GetString(i++));
                LoadProperty(LastNameProperty, sdr.GetString(i++));
                LoadProperty(UserNameProperty, sdr.GetString(i++));
                LoadProperty(PasswordProperty, sdr.GetValue(i++));
                LoadProperty(SaltProperty, sdr.GetValue(i++));
                LoadProperty(RFIDProperty, sdr.GetString(i++));
                LoadProperty(PasswordChangeDateProperty, sdr.GetValue(i++));
                LoadProperty(CreatedDateProperty, sdr.GetDateTime(i++));
                LoadProperty(CreatedByProperty, sdr.GetInt32(i++));
                LoadProperty(FirstTimeLoginProperty, sdr.GetBoolean(i++));
                LoadProperty(EmailAddressProperty, sdr.GetString(i++));
                LoadProperty(DeductIDProperty, Singular.Misc.ZeroNothing(sdr.GetInt32(i++)));
                LoadProperty(ResetStateProperty, sdr.GetInt32(i++));
            }

            MarkAsChild();
            MarkOld();
            BusinessRules.CheckRules();
        }
예제 #14
0
        public static MaterialsList GetMaterialsList()
        {
            MaterialsList materialsList = new MaterialsList();

            using (var cn = new MySqlConnection(AppUtility.AppUtil._LocalConnectionString))
            {
                cn.Open();
                using (var cm = cn.CreateCommand())
                {
                    StringBuilder SQL = new StringBuilder();
                    SQL.Append("select m.* from t_materialsdetail m join t_sortingline l on m.lineId = l.ID AND l.LINECODE = '1001' ORDER BY m.sequenceNo");

                    cm.CommandText = SQL.ToString();
                    using (var dr = new SafeDataReader(cm.ExecuteReader()))
                    {
                        while (dr.Read())
                        {
                            Materials materials = new Materials();
                            materials.ID            = dr.GetString("ID");
                            materials.orderDate     = dr.GetDateTime("orderDate").ToShortDateString();
                            materials.sequenceNo    = dr.GetInt16("sequenceNo");
                            materials.sortingTaskNo = dr.GetString("TaskNo");
                            materials.status        = dr.GetInt32("status");
                            materialsList.Add(materials);
                        }
                    }
                }
            }
            return(materialsList);
        }
예제 #15
0
        public QcavailablewidthModelList GetModelList(QcavailablewidthModel model)
        {
            QcavailablewidthTable table = new QcavailablewidthTable();
            SelectSqlSection      sql   = DataAccess.DefaultDB.Select(table, table.AllColumns());

            if (model.QualityCode != "")
            {
                sql.Where(table.QualityCode == model.QualityCode);
            }
            using (SafeDataReader sdr = new SafeDataReader(sql.ToDataReader()))
            {
                QcavailablewidthModelList result = new QcavailablewidthModelList();
                while (sdr.Read())
                {
                    QcavailablewidthModel m = new QcavailablewidthModel();
                    m.Iden         = sdr.GetInt32(table.Iden);
                    m.QualityCode  = sdr.GetString(table.QualityCode);
                    m.Gauge        = sdr.GetInt32(table.Gauge);
                    m.Diameter     = sdr.GetInt32(table.Diameter);
                    m.TotalNeedles = sdr.GetInt32(table.TotalNeedles);
                    m.Width        = sdr.GetInt32(table.Width);
                    m.MaxWidth     = sdr.GetInt32(table.MaxWidth);
                    m.UpdatedBy    = sdr.GetString(table.UpdatedBy);
                    m.UpdatedTime  = sdr.GetDateTime(table.UpdatedTime);
                    result.Add(m);
                }
                return(result);
            }
        }
예제 #16
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(IdProperty, dr.GetString("ID"));
     LoadProperty(SORTINGTASKNOProperty, dr.GetString("SORTINGTASKNO"));
     LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
     LoadProperty(PICKLINECODEProperty, dr.GetString("PICKLINECODE"));
     LoadProperty(PICKLINENAMEProperty, dr.GetString("PICKLINENAME"));
     LoadProperty(CUSTCODEProperty, dr.GetString("CUSTCODE"));
     LoadProperty(CUSTNAMEProperty, dr.GetString("CUSTNAME"));
     LoadProperty(INDEXNOProperty, dr.GetInt32("INDEXNO"));
     LoadProperty(OUTPORTProperty, dr.GetString("OUTPORT"));
     LoadProperty(StatusProperty, dr.GetInt32("Status"));
     LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
     LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
     LoadProperty(shortnameProperty, dr.GetString("shortname"));
 }
예제 #17
0
 private void FillSelf(SafeDataReader reader)
 {
     this.Id        = reader.GetInt32(IdProperty.FriendlyName);
     this.Name      = reader.GetString(NameProperty.FriendlyName);
     this.Uri       = reader.GetString(UriProperty.FriendlyName);
     this.CreatedOn = reader.GetDateTime(CreatedOnProperty.FriendlyName);
 }
예제 #18
0
        static public List <PrintInfo> GetCUTPrintEffice()
        {
            List <PrintInfo> printinfos = new List <PrintInfo>();

            using (var cn = new SqlConnection(AppUtil._PrintBarCode))
            {
                cn.Open();
                using (var cm = cn.CreateCommand())
                {
                    //cm.CommandText = "SELECT * from (SELECT top 5 oi_sequence,oi_retailer_name,oi_all_num,oi_start_time FROM bp_order_info WHERE oi_b_code =" + SortingLineTask.GetSortingLineTaskNo() + " AND oi_state = 2 and oi_start_time is not null order by oi_sequence desc) t order by t.oi_sequence";
                    cm.CommandText = "SELECT * from (SELECT top 5 oi_sequence,oi_retailer_name,oi_all_num,oi_start_time FROM bp_order_info WHERE oi_state = 2 and oi_start_time is not null order by oi_sequence desc) t order by t.oi_sequence";
                    using (var dr = new SafeDataReader(cm.ExecuteReader()))
                    {
                        while (dr.Read())
                        {
                            PrintInfo printinfo = new PrintInfo();
                            printinfo.CustName  = dr.GetString("oi_retailer_name");
                            printinfo.allnum    = dr.GetInt32("oi_all_num");
                            printinfo.starttime = dr.GetDateTime("oi_start_time");
                            printinfos.Add(printinfo);
                        }
                    }
                }
            }
            return(printinfos);
        }
예제 #19
0
        public Order Map(SafeDataReader reader)
        {
            var item = (Order)Activator.CreateInstance(typeof(Order), true);

            using (BypassPropertyChecks(item))
            {
                item.OrderId             = reader.GetInt32("OrderId");
                item.UserId              = reader.GetString("UserId");
                item.OrderDate           = reader.GetDateTime("OrderDate");
                item.ShipAddr1           = reader.GetString("ShipAddr1");
                item.ShipAddr2           = reader.GetString("ShipAddr2");
                item.ShipCity            = reader.GetString("ShipCity");
                item.ShipState           = reader.GetString("ShipState");
                item.ShipZip             = reader.GetString("ShipZip");
                item.ShipCountry         = reader.GetString("ShipCountry");
                item.BillAddr1           = reader.GetString("BillAddr1");
                item.BillAddr2           = reader.GetString("BillAddr2");
                item.BillCity            = reader.GetString("BillCity");
                item.BillState           = reader.GetString("BillState");
                item.BillZip             = reader.GetString("BillZip");
                item.BillCountry         = reader.GetString("BillCountry");
                item.Courier             = reader.GetString("Courier");
                item.TotalPrice          = reader.GetDecimal("TotalPrice");
                item.BillToFirstName     = reader.GetString("BillToFirstName");
                item.BillToLastName      = reader.GetString("BillToLastName");
                item.ShipToFirstName     = reader.GetString("ShipToFirstName");
                item.ShipToLastName      = reader.GetString("ShipToLastName");
                item.AuthorizationNumber = reader.GetInt32("AuthorizationNumber");
                item.Locale              = reader.GetString("Locale");
            }

            MarkOld(item);

            return(item);
        }
예제 #20
0
        private void DataPortal_Fetch()
        {
            using (BypassPropertyChecks)
            {
                using (var cn = new MySqlConnection(AppUtil._LocalConnectionString))
                {
                    cn.Open();
                    using (var cm = cn.CreateCommand())
                    {
                        cm.CommandText =
                            "SELECT * FROM T_SORTING_LINE_TASK_ABNORMAL t  WHERE t.status = 0 order by t.indexno limit 1";
                        //cm.Parameters.AddWithValue("@id", criteria.Value);
                        using (var dr = new SafeDataReader(cm.ExecuteReader()))
                        {
                            while (dr.Read())
                            {
                                LoadProperty(IdProperty, dr.GetString("ID"));
                                LoadProperty(SORTINGTASKNOProperty, dr.GetString("SORTINGTASKNO"));
                                LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
                                LoadProperty(PICKLINECODEProperty, dr.GetString("PICKLINECODE"));
                                LoadProperty(PICKLINENAMEProperty, dr.GetString("PICKLINENAME"));
                                LoadProperty(CUSTCODEProperty, dr.GetString("CUSTCODE"));
                                LoadProperty(CUSTNAMEProperty, dr.GetString("CUSTNAME"));
                                LoadProperty(INDEXNOProperty, dr.GetInt32("INDEXNO"));
                                LoadProperty(OUTPORTProperty, dr.GetString("OUTPORT"));
                                LoadProperty(StatusProperty, dr.GetInt32("Status"));
                                LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
                                LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
                            }
                        }
                    }

                    // load child objects
                    using (var cmProducts = cn.CreateCommand())
                    {
                        cmProducts.CommandText =
                            "SELECT * FROM T_SORTING_LINE_DETAIL_TASK_ABNORMAL tl WHERE tl.taskid =  @id and ";
                        cmProducts.Parameters.AddWithValue("@id", ID);
                        using (var drTaskDetails = new SafeDataReader(cmProducts.ExecuteReader()))
                        {
                            LoadProperty(SortingLineTaskDetailsProperty,
                                         AbnSortingLineTaskDetails.GetAbnSortingLineTaskDetails(drTaskDetails));
                        }
                    }
                }
            }
        }
예제 #21
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     SetProperty(ControllerNameProperty, dr.GetString(0));
     SetProperty(ActionNameProperty, dr.GetString(1));
     SetProperty(LogDataProperty, dr.GetString(2));
     SetProperty(CreatedByProperty, dr.GetString(3));
     SetProperty(CreatedDateProperty, dr.GetDateTime(4));
 }
예제 #22
0
        protected void Fetch(SafeDataReader sdr)
        {
            int i = 0;

            LoadProperty(QuestionnaireAnswerSetIDProperty, sdr.GetInt32(i++));
            LoadProperty(METTReportingNameProperty, sdr.GetString(i++));
            LoadProperty(OfficialNameProperty, sdr.GetString(i++));
            LoadProperty(OrganisationNameProperty, sdr.GetString(i++));
            LoadProperty(LegalDesignationProperty, sdr.GetString(i++));
            LoadProperty(LeadAssessorIDProperty, Singular.Misc.ZeroNothing(sdr.GetInt32(i++)));
            LoadProperty(AuditedByProperty, sdr.GetInt32(i++));
            LoadProperty(AssessmentStepProperty, sdr.GetString(i++));
            LoadProperty(AssessmentStepIdProperty, sdr.GetInt32(i++));
            LoadProperty(IsUnofficialProtectedAreaIndProperty, sdr.GetBoolean(i++));
            LoadProperty(AcceptedIndProperty, sdr.GetBoolean(i++));
            LoadProperty(CreatedDateTimeProperty, sdr.GetDateTime(i++));
            LoadProperty(ModifiedDateTimeProperty, sdr.GetDateTime(i++));
        }
예제 #23
0
파일: Ticket.cs 프로젝트: awancilik/CRM
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     SetProperty(idticketProperty, dr.GetInt64(0));
     SetProperty(TicketNoProperty, dr.GetString(1));
     SetProperty(TicketSubjectProperty, dr.GetString(2));
     SetProperty(RequesterProperty, dr.GetString(3));
     SetProperty(CallerPosistionProperty, dr.GetString(4));
     SetProperty(PriorityProperty, dr.GetString(5));
     SetProperty(TicketOwnerProperty, dr.GetString(6));
     SetProperty(TicketTypeProperty, dr.GetString(7));
     SetProperty(TicketStatusProperty, dr.GetString(8));
     SetProperty(TicketDescriptionProperty, dr.GetString(9));
     SetProperty(SolutionProperty, dr.GetString(10));
     SetProperty(EscalationProperty, dr.GetString(11));
     SetProperty(CreatedByProperty, dr.GetString(12));
     SetProperty(CreatedDateProperty, dr.GetDateTime(13));
     SetProperty(UpdatedByProperty, dr.GetString(14));
     SetProperty(UpdatedDateProperty, dr.GetDateTime(15));            
 }
예제 #24
0
파일: InTask.cs 프로젝트: wg3281/JZFJ
        private void DataPortal_Fetch()
        {
            using (BypassPropertyChecks)
            {
                using (var cn = new MySqlConnection(AppUtil._LocalConnectionString))
                {
                    cn.Open();


                    using (var cm = cn.CreateCommand())
                    {
                        cm.CommandText =
                            "SELECT * FROM T_INTASK t  WHERE t.type = 0 and t.status = 1 order by t.SEQUENCENO desc limit 1,1";
                        //cm.Parameters.AddWithValue("@id", criteria.Value);
                        using (var dr = new SafeDataReader(cm.ExecuteReader()))
                        {
                            while (dr.Read())
                            {
                                LoadProperty(IdProperty, dr.GetString("ID"));
                                LoadProperty(INTASKNOProperty, dr.GetString("INTASKNO"));
                                LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
                                LoadProperty(SEQUENCENOProperty, dr.GetString("SEQUENCENO"));
                                LoadProperty(CIGCODEProperty, dr.GetString("CIGCODE"));
                                LoadProperty(CIGNAMEProperty, dr.GetString("CIGNAME"));
                                LoadProperty(BARCODEProperty, dr.GetString("BARCODE"));
                                LoadProperty(PICKLINECODEProperty, dr.GetString("LINECODE"));
                                LoadProperty(PICKLINENAMEProperty, dr.GetString("LINENAME"));
                                LoadProperty(SUBLINECODEProperty, dr.GetString("SUBLINECODE"));
                                LoadProperty(INPORTCODEProperty, dr.GetString("INPORTCODE"));
                                LoadProperty(LINEBOXCODEProperty, dr.GetString("LINEBOXCODE"));
                                LoadProperty(LINEBOXNAMEProperty, dr.GetString("LINEBOXNAME"));
                                LoadProperty(ADDRESSCODEProperty, dr.GetString("ADDRESSCODE"));
                                LoadProperty(INQTYProperty, dr.GetInt32("INQTY"));
                                LoadProperty(PLCADDRESSProperty, dr.GetInt32("PLCADDRESS"));
                                LoadProperty(StatusProperty, dr.GetInt32("Status"));
                                LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
                                LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
                            }
                        }
                    }
                }
            }
        }
예제 #25
0
파일: MessageInfo.cs 프로젝트: wg3281/JZFJ
 internal MessageInfo(SafeDataReader dr)
 {
     Id        = dr.GetInt32("Id");
     MessageId = dr.GetInt32("MessageId");
     Title     = dr.GetString("Title");
     Content   = dr.GetString("Content");
     Replay    = dr.GetString("Replay");
     IsConfirm = dr.GetBoolean("IsConfirm");
     CreatedOn = dr.GetDateTime("CreateOn");
 }
예제 #26
0
파일: InTask.cs 프로젝트: wg3281/JZFJ
 void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(IdProperty, dr.GetString("ID"));
     LoadProperty(INTASKNOProperty, dr.GetString("INTASKNO"));
     LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
     LoadProperty(SEQUENCENOProperty, dr.GetString("SEQUENCENO"));
     LoadProperty(CIGCODEProperty, dr.GetString("CIGCODE"));
     LoadProperty(CIGNAMEProperty, dr.GetString("CIGNAME"));
     LoadProperty(BARCODEProperty, dr.GetString("BARCODE"));
     LoadProperty(PICKLINECODEProperty, dr.GetString("LINECODE"));
     LoadProperty(PICKLINENAMEProperty, dr.GetString("LINENAME"));
     LoadProperty(SUBLINECODEProperty, dr.GetString("SUBLINECODE"));
     LoadProperty(INPORTCODEProperty, dr.GetString("INPORTCODE"));
     LoadProperty(LINEBOXCODEProperty, dr.GetString("LINEBOXCODE"));
     LoadProperty(LINEBOXNAMEProperty, dr.GetString("LINEBOXNAME"));
     LoadProperty(ADDRESSCODEProperty, dr.GetString("ADDRESSCODE"));
     LoadProperty(INQTYProperty, dr.GetInt32("INQTY"));
     LoadProperty(PLCADDRESSProperty, dr.GetInt32("PLCADDRESS"));
     LoadProperty(StatusProperty, dr.GetInt32("Status"));
     LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
     LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
 }
예제 #27
0
 private void DataPortal_Fetch(SafeDataReader dr)
 {
     LoadProperty(IdProperty, dr.GetString("ID"));
     LoadProperty(SORTINGTASKNOProperty, dr.GetString("SORTINGTASKNO"));
     LoadProperty(ORDERDATEProperty, dr.GetString("ORDERDATE"));
     LoadProperty(PICKLINECODEProperty, dr.GetString("PICKLINECODE"));
     LoadProperty(PICKLINENAMEProperty, dr.GetString("PICKLINENAME"));
     LoadProperty(CUSTCODEProperty, dr.GetString("CUSTCODE"));
     LoadProperty(CUSTNAMEProperty, dr.GetString("CUSTNAME"));
     LoadProperty(INDEXNOProperty, dr.GetInt32("INDEXNO"));
     LoadProperty(OUTPORTProperty, dr.GetString("OUTPORT"));
     LoadProperty(LINECODEProperty, dr.GetString("LINECODE"));
     LoadProperty(LINENAMEProperty, dr.GetString("LINENAME"));
     LoadProperty(CORPCODEProperty, dr.GetString("CORPCODE"));
     LoadProperty(CORPNAMEProperty, dr.GetString("CORPNAME"));
     LoadProperty(ShortNameProperty, dr.GetString("ShortName"));
     LoadProperty(StatusProperty, dr.GetInt32("Status"));
     LoadProperty(PLCADDRESSProperty, dr.GetInt32("PLCADDRESS"));
     LoadProperty(ISLOCKProperty, dr.GetInt32("islock"));
     LoadProperty(SortingTimeProperty, dr.GetDateTime("SortingTime"));
     LoadProperty(FinishTimeProperty, dr.GetDateTime("FinishTime"));
 }
예제 #28
0
        /// <summary>
        /// Loads a <see cref="Doc"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(DocIDProperty, dr.GetInt32("DocID"));
            LoadProperty(DocClassIDProperty, dr.GetInt32("DocClassID"));
            LoadProperty(DocTypeIDProperty, dr.GetInt32("DocTypeID"));
            LoadProperty(SenderIDProperty, dr.GetInt32("SenderID"));
            LoadProperty(RecipientIDProperty, dr.GetInt32("RecipientID"));
            LoadProperty(DocRefProperty, dr.IsDBNull("DocRef") ? null : dr.GetString("DocRef"));
            LoadProperty(DocDateProperty, dr.GetSmartDate("DocDate", true));
            LoadProperty(SubjectProperty, dr.GetString("Subject"));
            LoadProperty(DocStatusIDProperty, dr.GetInt32("DocStatusID"));
            LoadProperty(CreateDateProperty, dr.GetDateTime("CreateDate"));
            LoadProperty(CreateUserIDProperty, dr.GetInt32("CreateUserID"));
            LoadProperty(ChangeDateProperty, dr.GetDateTime("ChangeDate"));
            LoadProperty(ChangeUserIDProperty, dr.GetInt32("ChangeUserID"));
            LoadProperty(RowVersionProperty, dr.GetValue("RowVersion") as byte[]);
            LoadProperty(SecretProperty, dr.GetString("Secret"));
            var args = new DataPortalHookArgs(dr);

            OnFetchRead(args);
        }
예제 #29
0
        protected override User ReaderToModel(SafeDataReader dr)
        {
            User user = new User();

            user.Address       = dr.GetString(nameof(User.Address));
            user.Avatar        = dr.GetString(nameof(User.Avatar));
            user.Birthday      = dr.GetDateTime(nameof(User.Birthday));
            user.CreationDTime = dr.GetDateTime(nameof(User.CreationDTime));
            //user.CustomId = dr.GetString(nameof(User.CustomId));
            user.Email     = dr.GetString(nameof(User.Email));
            user.Gender    = dr.GetInt16(nameof(User.Gender)) == 0 ? EGender.Male : EGender.Female;
            user.Hobby     = dr.GetString(nameof(User.Hobby));
            user.Id        = dr.GetInt64(nameof(User.Id));
            user.Name      = dr.GetString(nameof(User.Name));
            user.NickName  = dr.GetString(nameof(User.NickName));
            user.Password  = dr.GetString(nameof(User.Password));
            user.QQ        = dr.GetString(nameof(User.QQ));
            user.RealName  = dr.GetString(nameof(User.RealName));
            user.Remark    = dr.GetString(nameof(User.Remark));
            user.Signature = dr.GetString(nameof(User.Signature));
            user.Telphone  = dr.GetString(nameof(User.Telphone));
            user.WeChat    = dr.GetString(nameof(User.WeChat));

            string gradeName = dr.GetString("GradeName");

            if (string.IsNullOrEmpty(gradeName))
            {
                gradeName = "贱民";
            }
            Grade grade = new Grade()
            {
                Name = gradeName, Score = dr.GetInt64(nameof(Grade.Score))
            };

            user.UserGrade = grade;

            return(user);
        }
예제 #30
0
 private void DataPortal_Fetch(string taskid)
 {
     using (BypassPropertyChecks)
     {
         using (var cn = new MySqlConnection(AppUtil._LocalConnectionString))
         {
             cn.Open();
             using (var cm = cn.CreateCommand())
             {
                 cm.CommandText =
                     "SELECT * FROM t_sorting_line_task_abnormal WHERE id = @id";
                 cm.Parameters.AddWithValue("@id", taskid);
                 using (var dr = new SafeDataReader(cm.ExecuteReader()))
                 {
                     dr.Read();
                     LoadProperty(STATUSProperty, dr.GetInt32("STATUS"));
                     LoadProperty(SORTINGTIMEProperty, dr.GetDateTime("SORTINGTIME"));
                     LoadProperty(FINISHTIMEProperty, dr.GetDateTime("FINISHTIME"));
                     LoadProperty(IdProperty, dr.GetString("Id"));
                 }
             }
         }
     }
 }