Beispiel #1
0
        public void Save(DataTable dt, BatchDetail batchDet, string sessionid)
        {
            BatchRecordDetail det;
            string            strDate, strTime;
            int iPass = 0, iFail = 0, iBlank = 0, iType = 0;

            foreach (DataRow dr in dt.Rows)
            {
                det = new BatchRecordDetail();
                try
                {
                    if (DataUtils.GetColumnValue(dr, BatchUploadConstants.Name).Length > 0)
                    {
                        det.BatchID       = batchDet.ID;
                        det.CompanyID     = batchDet.CompanyID;
                        strDate           = DataUtils.GetColumnValue(dr, BatchUploadConstants.ReceivedDate);
                        strTime           = DataUtils.GetColumnValue(dr, BatchUploadConstants.ReceivedTime);
                        det.ReceivedDate  = Convert.ToDateTime(strDate);
                        det.CustomerRefNo = DataUtils.GetColumnValue(dr, BatchUploadConstants.CustomerRefNo);
                        det.LeadNo        = GMConvert.GetInt32(DataUtils.GetColumnValue(dr, BatchUploadConstants.LeadNumber));
                        det.CountyID      = GMConvert.GetInt32(DataUtils.GetColumnValue(dr, BatchUploadConstants.CountyID));
                        det.Name          = DataUtils.GetColumnValue(dr, BatchUploadConstants.Name);
                        det.DOB           = Convert.ToDateTime(DataUtils.GetColumnValue(dr, BatchUploadConstants.DOB));
                        iType             = GMConvert.GetInt32(DataUtils.GetColumnValue(dr, BatchUploadConstants.CaseTypeID));
                        if (iType > 0)
                        {
                            det.CaseTypeID = iType;
                        }
                        det.RecordStatusID   = Convert.ToInt32(BatchUploadConstants.EnumRecordStatusType.RESEARCH);
                        det.Years            = GMConvert.GetInt32(DataUtils.GetColumnValue(dr, BatchUploadConstants.Years));
                        det.SSN              = DataUtils.GetColumnValue(dr, BatchUploadConstants.SSN);
                        det.ClientRemarks    = DataUtils.GetColumnValue(dr, BatchUploadConstants.ClientRemarks);
                        det.ClientSplRemarks = DataUtils.GetColumnValue(dr, BatchUploadConstants.ClientSplRemarks);
                        det.ActualCaseType   = DataUtils.GetColumnValue(dr, BatchUploadConstants.ActualCaseType);
                        Save(det);
                        SaveRecordHistory(det.ID, det.RecordStatusID, batchDet.UserID);
                        iPass += 1;
                    }
                    else
                    {
                        iBlank += 1;
                    }
                }
                catch (Exception ex)
                {
                    iFail += 1;
                    m_msg.Add(string.Format(ErrorConstants.BatchSaveFailed, det.Name));
                    Logger.LogException(ex);
                }
            }
            batchDet.FailCount  = iFail;
            batchDet.PassCount  = iPass;
            batchDet.TotalCount = dt.Rows.Count - iBlank;
        }
Beispiel #2
0
        public void ChangePassword(string sessionid, string userid, string oldpwd, string newpwd)
        {
            DCUser2 dcusr = GetCache(sessionid);

            if (string.Compare(dcusr.Password, CryptoUtils.EncryptSHA(oldpwd), true) != 0)
            {
                throw new ApplicationException(ErrorConstants.ExistingPassword);
            }
            User2Detail detusr = new User2Detail();

            detusr.ID                 = (Int32?)GMConvert.GetInt32(userid);
            detusr.Password           = CryptoUtils.EncryptSHA(newpwd);
            detusr.LastPassword       = CryptoUtils.EncryptSHA(oldpwd);
            detusr.PasswordChangeDate = DateTime.Now;
            detusr.IsChangePasssword  = false;
            detusr.ModifiedDate       = DateTime.Now;
            Save(detusr);
            dcusr.Password          = CryptoUtils.EncryptSHA(newpwd);
            dcusr.IsChangePasssword = false;
        }
Beispiel #3
0
 public DCCase2(DataRow dr)
     : this(GMConvert.GetInt32(dr[Case2Record.ID.ToString()]), dr[Case2Record.Description.ToString()].ToString(), GMConvert.GetInt32(dr[Case2Record.LevelTypeID.ToString()]),
            GMConvert.GetInt32(dr[Case2Record.PleaTypeID.ToString()]), GMConvert.GetInt32(dr[Case2Record.DispositionTypeID.ToString()]))
 {
 }
Beispiel #4
0
 protected void OnDelete(object sender, GridViewDeleteEventArgs e)
 {
     grvCountyRate.Rows[e.RowIndex].Visible = false;
     m_biz.Delete(GMConvert.GetInt32(grvCountyRate.DataKeys[e.RowIndex].Value));
     Bind();
 }
Beispiel #5
0
 public DCCase2(GridView gv, GridViewRow gvr)
     : this(GMConvert.GetInt32(gv.DataKeys[gvr.RowIndex].Value), DataUtils.GetText(gvr, (int)Case2Record.Description), DataUtils.GetID(gvr, (int)Case2Record.LevelTypeID),
            DataUtils.GetID(gvr, (int)Case2Record.PleaTypeID), DataUtils.GetID(gvr, (int)Case2Record.DispositionTypeID))
 {
 }