Пример #1
0
        public static void EditGroupRoleMappingMaster(tbl_GroupRoleMappingMaster obj, double id)
        {
            using (BNKModel db = new BNKModel())
            {
                tbl_GroupRoleMappingMaster editobj = db.tbl_GroupRoleMappingMaster.Where(x => x.ID == id).FirstOrDefault();
                if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.ModifyStatus))
                {
                    editobj.PageName = obj.PageName;

                    editobj.UpdateBy = SessionObj.AccountName;

                    editobj.ApproveStat = Constants.ApproveModifyStatus;

                    editobj.UpdateTime = DateTime.Now;

                    editobj.IsActive = true;

                    db.SaveChanges();
                }
                else

                {
                    editobj.PageName    = obj.PageName;
                    editobj.IsActive    = false;
                    editobj.UpdateBy    = SessionObj.AccountName;
                    editobj.ApproveStat = Constants.ModifyStatus;
                    editobj.UpdateTime  = DateTime.Now;
                    db.SaveChanges();
                }
            }
        }
Пример #2
0
        public static void EditUser(tbl_UserDetail obj, double id)
        {
            BNKModel       db     = new BNKModel();
            tbl_UserDetail tblobj = db.tbl_UserDetail.Where(x => x.ID == id).FirstOrDefault();

            db.SaveChanges();
        }
Пример #3
0
        public static void EditErrCode(tbl_MasterErrorCode obj, double id)
        {
            BNKModel            db     = new BNKModel();
            tbl_MasterErrorCode tblobj = db.tbl_MasterErrorCode.Where(x => x.ID == id).FirstOrDefault();

            if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.SaveStatus))
            {
                tblobj.Error_Code        = obj.Error_Code;
                tblobj.Error_Description = obj.Error_Description;
                tblobj.Machine_Type      = obj.Machine_Type;
                tblobj.Make = obj.Make;
                // tblobj.IsActive = obj.IsActive;

                //
                tblobj.UpdateBy    = SessionObj.AccountName;
                tblobj.ApproveStat = Constants.ApproveSaveStatus;
                tblobj.IsActive    = true;
                //
                tblobj.UpdateTime = DateTime.Now;
            }
            else if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.ModifyStatus))
            {
                tblobj.Error_Code        = obj.Error_Code;
                tblobj.Error_Description = obj.Error_Description;
                tblobj.Machine_Type      = obj.Machine_Type;
                tblobj.Make = obj.Make;
                // tblobj.IsActive = obj.IsActive;

                //
                tblobj.UpdateBy    = SessionObj.AccountName;
                tblobj.ApproveStat = Constants.ApproveModifyStatus;
                tblobj.IsActive    = true;
                //
                tblobj.UpdateTime = DateTime.Now;
            }
            else
            {
                tblobj.Error_Code        = obj.Error_Code;
                tblobj.Error_Description = obj.Error_Description;
                tblobj.Machine_Type      = obj.Machine_Type;
                tblobj.Make = obj.Make;
                //tblobj.IsActive = obj.IsActive;

                //
                tblobj.UpdateBy    = SessionObj.AccountName;
                tblobj.ApproveStat = Constants.ModifyStatus;
                tblobj.IsActive    = false;
                //
                tblobj.UpdateTime = DateTime.Now;
            }
            db.SaveChanges();
        }
Пример #4
0
        public static void SaveUser(tbl_UserDetail obj)
        {
            //string DashboardURL = Convert.ToString(ConfigurationManager.AppSettings["DashboardURL"]);

            using (BNKModel db = new BNKModel())
            {
                var Check = db.tbl_UserDetail.Where(x => x.AccountName.Equals(obj.AccountName)).FirstOrDefault();
                if (Check == null)
                {
                    db.tbl_UserDetail.Add(obj);
                    db.SaveChanges();
                }
            }
        }
Пример #5
0
        public static void EditGLAccount(tbl_GLAccountList obj, double id)
        {
            BNKModel          db      = new BNKModel();
            tbl_GLAccountList editobj = db.tbl_GLAccountList.Where(x => x.ID == id).FirstOrDefault();

            if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.SaveStatus))
            {
                editobj.TerminalID   = obj.TerminalID;
                editobj.TerminalType = obj.TerminalType;
                editobj.GLNumber     = obj.GLNumber;
                //editobj.IsActive = obj.IsActive;

                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.ApproveStat = Constants.ApproveSaveStatus;
                editobj.IsActive    = true;

                //
                editobj.UpdateTime = DateTime.Now;
            }
            else if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.ModifyStatus))
            {
                editobj.TerminalID   = obj.TerminalID;
                editobj.TerminalType = obj.TerminalType;
                editobj.GLNumber     = obj.GLNumber;
                //editobj.IsActive = obj.IsActive;

                //
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.ApproveStat = Constants.ApproveModifyStatus;
                editobj.IsActive    = true;
                //
                editobj.UpdateTime = DateTime.Now;
            }

            else
            {
                editobj.TerminalID   = obj.TerminalID;
                editobj.TerminalType = obj.TerminalType;
                editobj.GLNumber     = obj.GLNumber;
                editobj.IsActive     = obj.IsActive;

                //
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.ApproveStat = Constants.ModifyStatus;
                editobj.IsActive    = false;
                //
                editobj.UpdateTime = DateTime.Now;
            }
            db.SaveChanges();
        }
Пример #6
0
        public static void Encrypalldata()
        {
            string decryptKey = Convert.ToString(ConfigurationManager.AppSettings["DecryptKey"]);

            BNKModel db     = new BNKModel();
            var      ejlist = db.tbl_EJData.ToList();

            foreach (var item in ejlist)
            {
                //item.AccountNumber = (!string.IsNullOrEmpty(item.AccountNumber) ? (CodeEncrypt(item.AccountNumber, decryptKey)) : string.Empty);
                item.CardNumber = (!string.IsNullOrEmpty(item.CardNumber) ? (CodeEncrypt(item.CardNumber, decryptKey)) : string.Empty);
            }
            db.SaveChanges();
            var diputelist = db.tbl_DisputeData.ToList();

            foreach (var item in diputelist)
            {
                item.AccountNumber   = (!string.IsNullOrEmpty(item.AccountNumber) ? (CodeEncrypt(item.AccountNumber, decryptKey)) : string.Empty);
                item.CardNumber      = (!string.IsNullOrEmpty(item.CardNumber) ? (CodeEncrypt(item.CardNumber, decryptKey)) : string.Empty);
                item.RegEmailId      = (!string.IsNullOrEmpty(item.RegEmailId) ? (CodeEncrypt(item.RegEmailId, decryptKey)) : string.Empty);
                item.RegMobileNumber = (!string.IsNullOrEmpty(item.RegMobileNumber) ? (CodeEncrypt(item.RegMobileNumber, decryptKey)) : string.Empty);
            }
            db.SaveChanges();
        }
Пример #7
0
        public static void SaveGLAccount(tbl_GLAccountList obj)
        {
            BNKModel          db     = new BNKModel();
            tbl_GLAccountList tblobj = new tbl_GLAccountList();

            tblobj = obj;
            //
            tblobj.EntryBy     = SessionObj.AccountName;
            tblobj.ApproveStat = Constants.SaveStatus;
            tblobj.IsActive    = false;
            //
            tblobj.EntryTime = DateTime.Now;
            db.tbl_GLAccountList.Add(tblobj);
            db.SaveChanges();
        }
Пример #8
0
        public static void SaveMasterBINList(tbl_MasterBINList obj)
        {
            BNKModel          db     = new BNKModel();
            tbl_MasterBINList tblobj = new tbl_MasterBINList();

            tblobj.BIN         = obj.BIN;
            tblobj.SUBBIN      = obj.SUBBIN;
            tblobj.ProductName = obj.ProductName;
            tblobj.IsActive    = false;
            tblobj.EntryBy     = SessionObj.AccountName;
            //
            tblobj.ApproveStat = Constants.SaveStatus;
            tblobj.EntryTime   = DateTime.Now;
            //
            db.tbl_MasterBINList.Add(tblobj);
            db.SaveChanges();
        }
Пример #9
0
        public static void SaveBot(tbl_BotMaster obj)
        {
            BNKModel      db     = new BNKModel();
            tbl_BotMaster tblobj = new tbl_BotMaster();

            tblobj.MachineName = obj.MachineName;
            tblobj.IsActive    = obj.IsActive;


            //
            tblobj.EntryBy     = SessionObj.AccountName;
            tblobj.ApproveStat = Constants.SaveStatus;
            //
            tblobj.EntryTime = DateTime.Now;
            db.tbl_BotMaster.Add(tblobj);
            db.SaveChanges();
        }
Пример #10
0
        public static void EditMasterBINList(tbl_MasterBINList obj, double id)
        {
            BNKModel          db      = new BNKModel();
            tbl_MasterBINList editobj = db.tbl_MasterBINList.Where(x => x.ID == id).FirstOrDefault();

            if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.SaveStatus))
            {
                editobj.BIN         = obj.BIN;
                editobj.SUBBIN      = obj.SUBBIN;
                editobj.ProductName = obj.ProductName;
                editobj.IsActive    = obj.IsActive;
                //
                editobj.ApproveStat = Constants.ApproveSaveStatus;
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.IsActive    = true;
                //
                editobj.EntryTime = DateTime.Now;
            }
            else if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.ModifyStatus))
            {
                editobj.BIN         = obj.BIN;
                editobj.SUBBIN      = obj.SUBBIN;
                editobj.ProductName = obj.ProductName;
                // editobj.IsActive = obj.IsActive;
                //
                editobj.ApproveStat = Constants.ApproveModifyStatus;
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.IsActive    = true;
                //
                editobj.UpdateTime = DateTime.Now;
            }
            else
            {
                editobj.BIN         = obj.BIN;
                editobj.SUBBIN      = obj.SUBBIN;
                editobj.ProductName = obj.ProductName;
                editobj.IsActive    = obj.IsActive;
                //
                editobj.ApproveStat = Constants.ModifyStatus;
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.IsActive    = false;
                //
                editobj.UpdateTime = DateTime.Now;
            }
            db.SaveChanges();
        }
Пример #11
0
        public static void SaveErrCode(tbl_MasterErrorCode obj)
        {
            BNKModel            db     = new BNKModel();
            tbl_MasterErrorCode tblobj = new tbl_MasterErrorCode();

            tblobj.Error_Code        = obj.Error_Code;
            tblobj.Error_Description = obj.Error_Description;
            tblobj.Machine_Type      = obj.Machine_Type;
            tblobj.Make = obj.Make;
            // tblobj.IsActive = obj.IsActive;


            //
            tblobj.EntryBy     = SessionObj.AccountName;
            tblobj.ApproveStat = Constants.SaveStatus;
            tblobj.IsActive    = false;
            //
            tblobj.EntryTime = DateTime.Now;
            db.tbl_MasterErrorCode.Add(tblobj);
            db.SaveChanges();
        }
Пример #12
0
        public static void EditBot(tbl_BotMaster obj, double id)
        {
            BNKModel      db     = new BNKModel();
            tbl_BotMaster tblobj = db.tbl_BotMaster.Where(x => x.ID == id).FirstOrDefault();

            if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.SaveStatus))
            {
                tblobj.MachineName = obj.MachineName;
                tblobj.IsActive    = obj.IsActive;
                //
                tblobj.UpdateBy    = SessionObj.AccountName;
                tblobj.ApproveStat = Constants.ApproveSaveStatus;
                //
                tblobj.UpdateTime = DateTime.Now;
            }
            else if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.ModifyStatus))
            {
                tblobj.MachineName = obj.MachineName;
                tblobj.IsActive    = obj.IsActive;
                //
                tblobj.UpdateBy    = SessionObj.AccountName;
                tblobj.ApproveStat = Constants.ApproveModifyStatus;
                //
                tblobj.UpdateTime = DateTime.Now;
            }
            else
            {
                tblobj.MachineName = obj.MachineName;
                tblobj.IsActive    = obj.IsActive;
                //
                tblobj.UpdateBy    = SessionObj.AccountName;
                tblobj.ApproveStat = Constants.ModifyStatus;
                //
                tblobj.UpdateTime = DateTime.Now;
            }


            db.SaveChanges();
        }
Пример #13
0
        public static void SaveUserInput(long Id, string solvedby, string comment, string useraction, string commenthold, string usertype)
        {
            BNKModel db = new BNKModel();

            if (solvedby.Trim().ToLower() == "reactive")
            {
                var objDispute = db.tbl_DisputeData.Where(x => x.FeedbackId == Id).FirstOrDefault();
                if (usertype.Trim().ToLower().Equals(Constants.UserGroups.Maker.ToLower()))
                {
                    if (useraction.ToLower() == "hold")
                    {
                        objDispute.Maker_Input       = useraction;
                        objDispute.MakerComment_Hold = commenthold;
                        objDispute.MakerHold_Time    = DateTime.Now;
                    }
                    else
                    {
                        objDispute.Maker_Input          = useraction;
                        objDispute.MakerComment         = comment;
                        objDispute.MakerProcess_EndTime = DateTime.Now;
                    }
                }
                else
                {
                    if (useraction.ToLower() == "hold")
                    {
                        objDispute.Checker_Input       = useraction;
                        objDispute.CheckerComment_Hold = commenthold;
                        objDispute.CheckerHold_Time    = DateTime.Now;
                    }
                    else
                    {
                        objDispute.Checker_Input          = useraction;
                        objDispute.CheckerComment         = comment;
                        objDispute.CheckerProcess_EndTime = DateTime.Now;
                        objDispute.Final_Status           = "Open";
                    }
                }
            }
            else
            {
                var objEjData = db.tbl_EJData.Where(x => x.EJID == Id).FirstOrDefault();
                if (usertype.Trim().ToLower().Equals(Constants.UserGroups.Maker.ToLower()))
                {
                    if (useraction.ToLower() == "hold")
                    {
                        objEjData.Maker_Input       = useraction;
                        objEjData.MakerComment_Hold = commenthold;
                        objEjData.MakerHold_Time    = DateTime.Now;
                    }
                    else
                    {
                        objEjData.Maker_Input          = useraction;
                        objEjData.MakerComment         = comment;
                        objEjData.MakerProcess_EndTime = DateTime.Now;
                    }
                }
                else
                {
                    if (useraction.ToLower() == "hold")
                    {
                        objEjData.Checker_Input       = useraction;
                        objEjData.CheckerComment_Hold = commenthold;
                        objEjData.CheckerHold_Time    = DateTime.Now;
                    }
                    else
                    {
                        objEjData.Checker_Input          = useraction;
                        objEjData.CheckerComment         = comment;
                        objEjData.CheckerProcess_EndTime = DateTime.Now;
                    }
                }
            }
            db.SaveChanges();
        }
Пример #14
0
        public static void EditMasterDeviceList(tbl_MasterDeviceList obj, double id)
        {
            BNKModel             db      = new BNKModel();
            tbl_MasterDeviceList editobj = db.tbl_MasterDeviceList.Where(x => x.ID == id).FirstOrDefault();

            if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.SaveStatus))
            {
                editobj.ModelNumber          = obj.ModelNumber;
                editobj.SerialNumber         = obj.SerialNumber;
                editobj.Make                 = obj.Make;
                editobj.TerminalID           = obj.TerminalID;
                editobj.TerminalType         = obj.TerminalType;
                editobj.DeviceId             = obj.DeviceId;
                editobj.DeviceLocation       = obj.DeviceLocation;
                editobj.CustodianAlertMobile = obj.CustodianAlertMobile;
                editobj.CustodianAlertEmail  = obj.CustodianAlertEmail;
                editobj.Custodian            = obj.Custodian;

                //editobj.IsActive = obj.IsActive;
                //
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.ApproveStat = Constants.ApproveSaveStatus;
                editobj.IsActive    = true;
                //
                editobj.EntryTime = DateTime.Now;
            }
            else if (!string.IsNullOrEmpty(obj.ApproveStat) && obj.ApproveStat.Equals(Constants.ModifyStatus))
            {
                editobj.ModelNumber          = obj.ModelNumber;
                editobj.SerialNumber         = obj.SerialNumber;
                editobj.Make                 = obj.Make;
                editobj.TerminalID           = obj.TerminalID;
                editobj.TerminalType         = obj.TerminalType;
                editobj.DeviceId             = obj.DeviceId;
                editobj.DeviceLocation       = obj.DeviceLocation;
                editobj.CustodianAlertMobile = obj.CustodianAlertMobile;
                editobj.CustodianAlertEmail  = obj.CustodianAlertEmail;
                editobj.Custodian            = obj.Custodian;

                //editobj.IsActive = obj.IsActive;
                //
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.ApproveStat = Constants.ApproveModifyStatus;
                editobj.IsActive    = true;
                //
                editobj.UpdateTime = DateTime.Now;
            }
            else
            {
                editobj.ModelNumber          = obj.ModelNumber;
                editobj.SerialNumber         = obj.SerialNumber;
                editobj.Make                 = obj.Make;
                editobj.TerminalID           = obj.TerminalID;
                editobj.TerminalType         = obj.TerminalType;
                editobj.DeviceId             = obj.DeviceId;
                editobj.DeviceLocation       = obj.DeviceLocation;
                editobj.CustodianAlertMobile = obj.CustodianAlertMobile;
                editobj.CustodianAlertEmail  = obj.CustodianAlertEmail;
                editobj.Custodian            = obj.Custodian;

                //editobj.IsActive = obj.IsActive;
                //
                editobj.UpdateBy    = SessionObj.AccountName;
                editobj.ApproveStat = Constants.ModifyStatus;
                editobj.IsActive    = false;
                //
                editobj.UpdateTime = DateTime.Now;
            }
            db.SaveChanges();
        }