Ejemplo n.º 1
0
        private void DoAction(ReceiveMsgStruct[] array)
        {
            if (array != null && array.Length > 0)
            {
                SMSReceiveListModel model   = new SMSReceiveListModel();
                DataTable           dtWrite = model.Tables[0];

                foreach (ReceiveMsgStruct item in array)
                {
                    DataRow dr = dtWrite.NewRow();

                    dr[SMSReceiveListModel.CSShortName] = item.CSShortName;
                    dr[SMSReceiveListModel.UserName]    = item.UserName;
                    dr[SMSReceiveListModel.UniqueID]    = item.UniqueID;
                    dr[SMSReceiveListModel.RequestTime] = new DateTime(item.RequestTime).ToString("yyyy-MM-dd HH:mm:ss");
                    dr[SMSReceiveListModel.ReceiveTime] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    dr[SMSReceiveListModel.TelNumber]   = item.TelNumber;
                    dr[SMSReceiveListModel.Content]     = item.Content;

                    dtWrite.Rows.Add(dr);
                }

                CommonBll cBll = new CommonBll(SP.DataConnectType.CustomDBDataService);
                if (cBll.BulkInsert(model))
                {
                    LastExecTime = DateTime.Now;
                }
                else//error
                {
                    AsyncHelper.RunSync <bool>(() => Manager.Instance.WriteLogFile("ReceiveDBLogWorker_BulkInsert未插入"));
                }
            }
        }
Ejemplo n.º 2
0
        public SMSReceiveListBLL(DataConnectType dct)
        {
            _infomation = string.Empty;

            _dct = dct;

            model = new SMSReceiveListModel();
        }
Ejemplo n.º 3
0
        public SMSReceiveListBLL()
        {
            _infomation = string.Empty;

            _dct = DataConnectType.ServerDBDataService;

            model = new SMSReceiveListModel();
        }