public string GetEncryptedmandateId(GetMandateReq Data)
        {
            string URl    = "";
            string TempId = "";

            try
            {
                TempId = Dbsecurity.Decrypt(Data.AppId) + Dbsecurity.Decrypt(Data.MandateId);
                TempId = Global.ReverseString(TempId);
                TempId = Global.CreateRandomCode(6) + TempId;

                List <GetCredential>       GetCredentialList = new List <GetCredential>();
                QuickCheck_AngularEntities dbcontext         = new QuickCheck_AngularEntities();
                var Result = dbcontext.MultipleResults("[dbo].[Sp_GetMandatemodeData]").With <GetCredential>().
                             Execute("@QueryType", "@AppId", "GetEntityCredential", Dbsecurity.Decrypt(Data.AppId));
                GetCredentialList = Result[0].Cast <GetCredential>().ToList();
                try
                {
                    dbcontext = new QuickCheck_AngularEntities();
                    var Result1 = dbcontext.MultipleResults("[dbo].[sp_ESign]").With <doneres>().
                                  Execute("@QueryType", "@MandateId", "@WebAppUrl", "@EncodedMandateID", "@AppId", "@EncodedAppId", "SaveLinkWithoutSMS", Dbsecurity.Decrypt(Data.MandateId), GetCredentialList[0].EWebAppUrl, TempId, Dbsecurity.Decrypt(Data.AppId), Data.AppId);

                    URl = "/MandateDetails?ID=" + TempId + "&AppId=" + Data.AppId;
                    // string WebAppUrl = ConfigurationManager.AppSettings["EWebAppUrl"].ToString();
                    //  CommonManger.FillDatasetWithParam("sp_ESign", );
                }
                catch (Exception ex) { }
            }
            catch (Exception ex)
            { return("0"); }
            return(URl);
        }
        public gridlist BindGrid(MandateDetails data)
        {
            try
            {
                gridlist        res          = new gridlist();
                List <BindGrid> BindGridlist = new List <BindGrid>();
                //      var Result = Common.Getdata(dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With<BindGrid>().Execute("@QueryType", "@UserId", "@AppId", "@ToDate"
                //, "@FromDate", "grdMandateDataDateWise", Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(data.UserId.Replace("_", "%"))), data.AppId, data.ToDate, data.FromDate));
                //      BindGridlist = Result.Cast<BindGrid>().ToList();
                var Result = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <BindGrid>().Execute("@QueryType", "@UserId", "@AppId", "@ToDate"
                                                                                                       , "@FromDate", "grdMandateDataDateWise", Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(data.UserId.Replace("_", "%"))), data.AppId, data.ToDate, data.FromDate);
                BindGridlist = Result[0].Cast <BindGrid>().ToList();

                for (var i = 0; i < BindGridlist.Count; i++)
                {
                    BindGridlist[i].AcNo             = Dbsecurity.Decrypt(Convert.ToString(BindGridlist[i].AcNo));
                    BindGridlist[i].Amount_Numeric   = Dbsecurity.Decrypt(Convert.ToString(BindGridlist[i].Amount_Numeric));
                    BindGridlist[i].EncryptMandateId = Dbsecurity.Encrypt(Convert.ToString(BindGridlist[i].MandateFreshId));
                }
                res.BindGridlist = BindGridlist;

                return(res);
            }


            catch (Exception ex)
            {
                throw ex;
            }
        }
        public ResAccountValidation Acvalidate(AccountValidationModel Acdata)
        {
            List <pennyDetails>     res  = new List <pennyDetails>();
            List <pennyDetailsList> res1 = new List <pennyDetailsList>();

            res = GetPennydropDetails.Getpennydata(Acdata.IFSC, Dbsecurity.Decrypt(Acdata.AppId)).Cast <pennyDetails>().ToList();
            try
            {
                if (res[0].Name.ToUpper().Contains("IDFC"))
                {
                    //if (Acdata.IFSC.Substring(0, 4).Trim() == ConfigurationManager.AppSettings["IDFC_IFSC"].ToString().Trim())
                    //{
                    //    return AccountValidationMethods.AckPaymentTestNew(Acdata.ActivityId, Dbsecurity.Decrypt(Acdata.MandateId), Dbsecurity.Decrypt(Acdata.AcNo), Acdata.IFSC, Dbsecurity.Decrypt(Acdata.UserId), Dbsecurity.Decrypt(Acdata.AppId), Dbsecurity.Decrypt(Acdata.EntityId));
                    //}
                    //else
                    //{
                    // Response.Write("In AckPaymentTestNew_IDFC");
                    return(IDFC_Acvalidate.IDFCAccountval(Acdata.ActivityId, Dbsecurity.Decrypt(Acdata.MandateId), Dbsecurity.Decrypt(Acdata.AcNo), Acdata.IFSC, Dbsecurity.Decrypt(Acdata.UserId), Dbsecurity.Decrypt(Acdata.AppId), Dbsecurity.Decrypt(Acdata.EntityId), res));
                    /// }
                }
                else
                {
                    return(AccountValidationMethods.KotakAccountVal(Acdata.ActivityId, Dbsecurity.Decrypt(Acdata.MandateId), Dbsecurity.Decrypt(Acdata.AcNo), Acdata.IFSC, Dbsecurity.Decrypt(Acdata.UserId), Dbsecurity.Decrypt(Acdata.AppId), Dbsecurity.Decrypt(Acdata.EntityId), res));
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        public IEnumerable <CustomerResponse> SaveCustomer(JsonCustomerDetails Data, string UserId)
        {
            FAMSEntities     context         = new FAMSEntities();
            CustomerResponse ObjCustResponse = new CustomerResponse();

            try
            {
                string Password = string.Empty;
                List <CustomerResponse> dataList = new List <CustomerResponse>();
                Password = Dbsecurity.Encrypt(Data.CustomerEmailID.Split('@').ElementAtOrDefault(0));
                var results = context.MultipleResults("[dbo].[Sp_user]").With <CustomerResponse>().Execute("@QueryType", "@UserId", "@UserName", "@AccountNo", "@EmailId", "@Password", "@pmsempid", "SaveData", Dbsecurity.Decrypt(UserId).ToString(), Data.CustomerUsername.ToString(), Data.CustomerAccount.ToString(), Data.CustomerEmailID.ToString(), Password.ToString(), Data.EmployeeCode.ToString());
                //results.tab
                dataList = results.FirstOrDefault().Cast <CustomerResponse>().ToList();
                if (dataList.Cast <CustomerResponse>().ToList().Select(x => x.value).First().ToString() == "1")
                {
                    using (StringWriter sw = new StringWriter())
                    {
                        using (HtmlTextWriter hw = new HtmlTextWriter(sw))
                        {
                            StringBuilder sb            = new StringBuilder();
                            string        WebAppUrl     = ConfigurationManager.AppSettings["WebAppUrl"].ToString();
                            string        SMTPHost      = ConfigurationManager.AppSettings["SMTPHost"].ToString();
                            string        FromMailId    = ConfigurationManager.AppSettings["UserId"].ToString();
                            string        MailPassword  = ConfigurationManager.AppSettings["MailPassword"].ToString();
                            string        SMTPPort      = ConfigurationManager.AppSettings["SMTPPort"].ToString();
                            string        SMTPEnableSsl = ConfigurationManager.AppSettings["SMTPEnableSsl"].ToString();
                            sb.Append("Dear " + (Data.CustomerUsername).ToString() + ",<br> <br>");
                            sb.Append("Please find your new Password is --   " + Dbsecurity.Decrypt(Password).ToString() + " <br> <br>");

                            SmtpClient  smtpClient  = new SmtpClient();
                            MailMessage mailmsg     = new MailMessage();
                            MailAddress mailaddress = new MailAddress(FromMailId);
                            mailmsg.To.Add((Data.CustomerEmailID).ToString());
                            mailmsg.From = mailaddress;

                            mailmsg.Subject    = "User New Password";
                            mailmsg.IsBodyHtml = true;
                            mailmsg.Body       = sb.ToString();

                            smtpClient.Host                  = SMTPHost;
                            smtpClient.Port                  = Convert.ToInt32(SMTPPort);
                            smtpClient.EnableSsl             = Convert.ToBoolean(SMTPEnableSsl);
                            smtpClient.UseDefaultCredentials = true;
                            smtpClient.Credentials           = new System.Net.NetworkCredential(FromMailId, MailPassword);
                            smtpClient.Send(mailmsg);
                            //QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities();
                            //dbcontext.MultipleResults("[dbo].[Sp_SendEmail]").With<Responsevalue>().Execute("@QueryType", "@MandateId", "@EmailCount", "@SmsCount", "SendMail", Convert.ToString(0), "1", "0");
                        }
                    }
                }
                return(dataList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 5
0
        public IEnumerable <ResponseFlag> FinalUploadCropImage(UploadMandateModel context)
        {
            List <ResponseFlag> common = new List <ResponseFlag>();
            ResponseFlag        Flag   = new ResponseFlag();

            try
            {
                string croppedFileName = string.Empty;
                string filePath        = string.Empty;
                string ID          = Convert.ToString(Dbsecurity.Decrypt(context.MdtID));
                string No          = Convert.ToString(Dbsecurity.Decrypt(context.RefrenceNo));
                string APPId       = Convert.ToString(Dbsecurity.Decrypt(context.AppID));
                string UserId      = Convert.ToString(Dbsecurity.Decrypt(context.UserId));
                string JPGFilepath = string.Empty;
                croppedFileName = ConfigurationManager.AppSettings["DownloadFileName" + APPId].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + No + ".tif";
                filePath        = "../MandateFile/" + APPId + "/" + ID + "/" + croppedFileName;
                string MandateId = ID;

                if (File.Exists(HttpContext.Current.Server.MapPath("~/MandateFile/" + APPId + "/" + MandateId + "/" + ConfigurationManager.AppSettings["DownloadFileName"].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + Convert.ToString(No) + ".tif")) && File.Exists(HttpContext.Current.Server.MapPath("~/MandateFile/" + APPId + "/" + MandateId + "/" + ConfigurationManager.AppSettings["DownloadFileName"].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + Convert.ToString(No) + ".jpg")))
                {
                    croppedFileName = ConfigurationManager.AppSettings["DownloadFileName" + APPId].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + No + ".jpg";
                    JPGFilepath     = "../MandateFile/" + APPId + "/" + ID + "/" + croppedFileName;
                    QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities();
                    List <GetLogo>             dataList1 = new List <GetLogo>();
                    var Result2 = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <GetLogo>().Execute("@QueryType", "@TIPPath", "@PNGPath", "@MandateId", "@UserId", "UpdatePNGTIP",
                                                                                                           Convert.ToString(filePath), Convert.ToString(JPGFilepath), Convert.ToString(ID), Convert.ToString(UserId));
                    Flag.Flag      = "1";
                    Flag.FlagValue = "Mandate uploaded successfully";
                    common.Add(Flag);
                }
                else
                {
                    QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities();
                    List <GetLogo>             dataList1 = new List <GetLogo>();
                    var Result2 = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <GetLogo>().Execute("@QueryType", "@TIPPath", "@PNGPath", "@MandateId", "@UserId", "UpdatePNGTIP",
                                                                                                           null, null, ID, UserId);
                    Flag.Flag      = "1";
                    Flag.FlagValue = "Image is not Properly Uploaded,Please Upload again";
                    common.Add(Flag);
                }
                // }
            }
            catch (Exception ex)
            {
                Flag.Flag      = "1";
                Flag.FlagValue = "Image is not Properly Uploaded,Please Upload again";
                common.Add(Flag);
            }


            return(common);
        }
Exemplo n.º 6
0
        public Dictionary<string, object> BindEmployees(string UserId)
        {
            FAMSEntities context = new FAMSEntities();
            try
            {
                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_BankBook]").With<BindEmployees>()
                           .Execute("@Querytype", "@UserId", "BindEmployees", Dbsecurity.Decrypt(UserId)));
                return results;

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public Dictionary <string, object> BindDefaultData(GridFields Data)
 {
     //FAMSEntities context = new FAMSEntities();
     try
     {
         var UserId  = Dbsecurity.Decrypt(Data.UserId);
         var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_CapitalStatement]").With <PageLoadData>()
                                      .Execute("@Querytype", "@UserId", "@CustomerAccount", "GetDefault_StatemenetOfExpenses", UserId, Data.CustomerAccountNo));
         return(results);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public Dictionary <string, object> BindNextData(GridFields Data)
        {
            FAMSEntities context = new FAMSEntities();

            try
            {
                //Data.PageCount = Data.PageCount - 1;
                var UserId  = Dbsecurity.Decrypt(Data.UserId);
                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_Portfolio_Fact]").With <PageLoadData>()
                                             .Execute("@Querytype", "@CustomerAccount", "@UserId", "@PageCount", "NextRecords", Data.CustomerAccountNo, UserId, Data.PageCount));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //public Dictionary<string, object> BindDefaultData(GridFields Data)
        //{
        //    FAMSEntities context = new FAMSEntities();
        //    try
        //    {
        //        var UserId = Dbsecurity.Decrypt(Data.UserId);
        //        var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_Portfolio_Fact]").With<PageLoadData>()
        //                    .Execute("@Querytype", "@UserId", "GetDefault_StatemenetOfExpenses", UserId));
        //        return results;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}



        public Dictionary <string, object> BindDefaultData(GridFields Data)
        {
            FAMSEntities context = new FAMSEntities();

            try
            {
                var UserId = Dbsecurity.Decrypt(Data.UserId);
                // var CustomerAccountNo = Dbsecurity.Decrypt(Data.CustomerAccountNo);
                var CustomerAccountNo = (Data.CustomerAccountNo);

                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_Portfolio_Fact]").With <PageLoadData>()
                                             .Execute("@Querytype", "@UserId", "@CustomerAccount", "GetDefault_Factportfolio2", UserId, CustomerAccountNo));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 10
0
 public string PrintMandate(PrintmandateModal MData)
 {
     try
     {
         if (MData.QR.ToLower() == "true".ToLower())
         {
             PrintHelper.UpdatePrintcount(Dbsecurity.Decrypt(MData.AppId), Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.UserId));
             return(PrintWithQR.PrintWIthQR(Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.AppId)));
         }
         else
         {
             PrintHelper.UpdatePrintcount(Dbsecurity.Decrypt(MData.AppId), Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.UserId));
             return(PrintWithoutQR.PrintWIthoutQR(Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.AppId)));
         }
         // ds.Tables[4].Rows[0]["mandateid"] = DbSecurity.Encrypt(Convert.ToString(ds.Tables[4].Rows[0]["mandateid"]));
     }
     catch
     {
         return(null);
     }
 }
        //public Dictionary<string, object> CheckReference(CheckReference checkreference, string mandateId, string EntityId)
        //{
        //    try
        //    {
        //        if (mandateId == "0")
        //        {
        //            mandateId = "";
        //        }
        //        else
        //        {

        //        }

        //        var Result = Common.Getdata(dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With<CheckReference>().With<CheckReference>().Execute("@QueryType", "@mandateId", "@Refrence1", "@EntityId", "CheckRefrence", mandateId, checkreference.Refrence1, DbSecurity.Decrypt(HttpContext.Current.Server.UrlDecode(EntityId.Replace("_", "%")))));
        //        // Result.Add("IsRefrenceCheck", DbSecurity.Decrypt(HttpContext.Current.Server.UrlDecode(IsRefrenceCheck.Replace("_", "%"))));
        //        return Result;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}


        public Dictionary <string, object> SaveData(UserEntity savedata, string mandateid)
        {
            var Result = new Dictionary <string, object>();

            try
            {
                if (mandateid == "0")
                {
                    List <SaveData4> MandateDataList = new List <SaveData4>();
                    var res = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <SaveData0>().With <SaveData1>().With <SaveData2>().With <SaveData3>().With <SaveData4>().With <SaveData5>().With <SaveData6>().With <SaveData7>().With <SaveData8>().Execute("@QueryType", "@SponsorCode", "@UtilityCode", "@DebitType", "@Frequency", "@UserId", "@EntityId",
                                                                                                                                                                                                                                                                 "@ToDebit", "@AcNo", "@BankName", "@IFSC", "@MICR", "@AmountRupees", "@Refrence1", "@Refrence2", "@PhNumber",
                                                                                                                                                                                                                                                                 "@EmailId", "@From", "@To", "@Customer1", "@Customer2", "@Customer3", "@DateOnMandate", "@MandateMode", "@AmountWords", "@CategoryCode", "@AppId", "@ProductId", "SaveData", savedata.Sponsorcode, savedata.Utilitycode, savedata.Debittype, savedata.Frequency, Dbsecurity.Decrypt(savedata.UserId), Dbsecurity.Decrypt(savedata.EntityId),
                                                                                                                                                                                                                                                                 savedata.Todebit, savedata.Bankaccountno, savedata.Withbank,
                                                                                                                                                                                                                                                                 savedata.IFSC.ToUpper(), savedata.MICR.ToUpper(), savedata.Amountrupees, savedata.Refrence1, savedata.Refrence2, savedata.Phoneno, savedata.Email, savedata.PeriodFrom, savedata.PeriodTo, savedata.Customer1.ToUpper(),
                                                                                                                                                                                                                                                                 savedata.Customer2.ToUpper(), savedata.Customer3.ToUpper(), savedata.UMRNDATE, savedata.MandateMode, savedata.Amount, savedata.Catagorycode, savedata.AppId, savedata.ProductName);

                    MandateDataList = res[4].Cast <SaveData4>().ToList();

                    Result = Common.Getdata(res);
                    //Result[0].Cast<CutterImag>().ToList();
                    //MandateDataList =
                    QRCodeMaker.QRGenerator(MandateDataList[0].mandateid, Dbsecurity.Decrypt(savedata.EntityId).ToString(), savedata.Refrence1, savedata.AppId);
                }
                else
                {
                    Result = Common.Getdata(dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <SaveData0>().With <SaveData1>().With <SaveData2>().With <SaveData3>().With <SaveData4>().With <SaveData5>().With <SaveData6>().With <SaveData7>().With <SaveData8>().Execute("@QueryType", "@SponsorCode", "@UtilityCode", "@DebitType", "@Frequency", "@UserId", "@EntityId",
                                                                                                                                                                                                                                                                               "@ToDebit", "@AcNo", "@BankName", "@IFSC", "@MICR", "@AmountRupees", "@Refrence1", "@Refrence2", "@PhNumber",
                                                                                                                                                                                                                                                                               "@EmailId", "@From", "@To", "@Customer1", "@Customer2", "@Customer3", "@DateOnMandate", "@MandateMode", "@AmountWords", "@CategoryCode", "@MandateId", "@AppId", "@ProductId", "UpdateData", savedata.Sponsorcode, savedata.Utilitycode, savedata.Debittype, savedata.Frequency, Dbsecurity.Decrypt(savedata.UserId), Dbsecurity.Decrypt(savedata.EntityId),
                                                                                                                                                                                                                                                                               savedata.Todebit, savedata.Bankaccountno, savedata.Withbank,
                                                                                                                                                                                                                                                                               savedata.IFSC.ToUpper(), savedata.MICR.ToUpper(), savedata.Amountrupees, savedata.Refrence1, savedata.Refrence2, savedata.Phoneno, savedata.Email, savedata.PeriodFrom, savedata.PeriodTo, savedata.Customer1.ToUpper(),
                                                                                                                                                                                                                                                                               savedata.Customer2.ToUpper(), savedata.Customer3.ToUpper(), savedata.UMRNDATE, savedata.MandateMode, savedata.Amount, savedata.Catagorycode, mandateid, savedata.AppId, savedata.ProductName));
                }
                return(Result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 12
0
        public IEnumerable <ResponseFlag> ViewCropImage(UploadMandateModel context)
        {
            List <ResponseFlag> common = new List <ResponseFlag>();
            ResponseFlag        Flag   = new ResponseFlag();
            string ID     = Convert.ToString(Dbsecurity.Decrypt(context.MdtID));
            string No     = Convert.ToString(Dbsecurity.Decrypt(context.RefrenceNo));
            string APPId  = Convert.ToString(Dbsecurity.Decrypt(context.AppID));
            string UserId = Convert.ToString(Dbsecurity.Decrypt(context.UserId));

            try
            {
                QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities();
                List <BindGrid>            dataList1 = new List <BindGrid>();
                var Result2 = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <BindGrid>().Execute("@QueryType", "@MandateId", "@AppId", "EditMandate", ID, APPId);
                Flag.IsPrint = dataList1.Cast <BindGrid>().ToList().Select(x => x.IsPrint).First().ToString();
                Flag.IsScan  = dataList1.Cast <BindGrid>().ToList().Select(x => x.IsScan).First().ToString();
                Flag.Flag    = "1";
                common.Add(Flag);
            }
            catch (Exception ex) { throw ex; }
            return(common);
        }
Exemplo n.º 13
0
 public Dictionary<string, object> BindDefaultData(GridFields Data)
 {
     FAMSEntities context = new FAMSEntities();
     try
     {
         var results = Common.Getdata(context.MultipleResults("[dbo].[SP_PortfolioAppraisal]").With<PageLoadData>()
                     .Execute("@Querytype", "@CustomerAccount", "@GUserId", "GetDefault_PortfolioAppraisal", Data.CustomerAccountno, Dbsecurity.Decrypt(Data.UserID)));
         return results;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 14
0
        public Dictionary <string, object> SaveData(JsonNotesDetails Data)
        {
            try
            {
                Random rand       = new Random();
                int    ranno      = rand.Next(1000, 9999);
                string fileName   = string.Empty;
                string filePath   = string.Empty;
                string extension  = string.Empty;
                string targetPath = string.Empty;
                string Emailtype  = string.Empty;
                int    notelength = 0;
                int    sublength  = 0;
                if (Data.Attachment != null)
                {
                    fileName = Data.Subject + "_" + Dbsecurity.Decrypt(Data.UserId) + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + ranno + ".jpg";
                    filePath = Path.Combine(HttpContext.Current.Server.MapPath("~/Notificationattachments/"), fileName);
                    byte[] bytes = System.Convert.FromBase64String(Data.Attachment);
                    using (System.Drawing.Image image = new Bitmap(new MemoryStream(bytes)))
                    {
                        image.Save(filePath, ImageFormat.Png);
                    }
                }
                string dtEmail = "<dtXml>";
                if (Data.Email == "1")
                {
                    List <AllEmail> dataList = new List <AllEmail>();

                    var Result1 = context.MultipleResults("[dbo].[Sp_NotesMaster]").With <AllEmail>().Execute("@QueryType", "AllEmail");
                    foreach (var emaildata in Result1)
                    {
                        dataList = emaildata.Cast <AllEmail>().ToList();
                        if (dataList.Count > 0)
                        {
                            for (int i = 0; i < dataList.Count; i++)
                            {
                                dtEmail += "<dtXml ";
                                dtEmail += " Emailid=" + @"""" + Convert.ToString(dataList[i].EmailId) + @"""";
                                dtEmail += " EmailType=" + @"""" + 1 + @"""";
                                dtEmail += " />";
                                SendMail(Convert.ToString(dataList[i].EmailId), Convert.ToString(dataList[i].EmailId), Data.Subject, Data.Note, filePath);
                            }
                        }
                    }
                    dtEmail += "</dtXml>";
                }
                else
                {
                    //  string dtEmail = "<dtXml>";
                    string[] Email = Data.Email.Split(',');
                    for (int i = 0; i < Email.Length; i++)
                    {
                        dtEmail += "<dtXml ";
                        dtEmail += " Emailid=" + @"""" + Email[i] + @"""";
                        dtEmail += " EmailType=" + @"""" + 2 + @"""";
                        dtEmail += " />";
                        SendMail(Convert.ToString(Email[i]), Convert.ToString(Email[i]), Data.Subject, Data.Note, filePath);
                    }
                    dtEmail += "</dtXml>";
                }
                if (Data.Note.Length <= 35)
                {
                    notelength = 0;
                }
                else
                {
                    notelength = 1;
                }
                if (Data.Subject.Length <= 35)
                {
                    sublength = 0;
                }
                else
                {
                    sublength = 1;
                }
                FAMSEntities context1 = new FAMSEntities();
                var          results  = Common.Getdata(context1.MultipleResults("[dbo].[Sp_NotesMaster]").With <CommonFields>().Execute("@QueryType", "@Subject", "@Note", "@Attachment", "@UserId", "@dtEmail", "@notelength", "@sublength", "SaveData", Data.Subject, Data.Note, fileName, Dbsecurity.Decrypt(Data.UserId), dtEmail, Convert.ToString(notelength), Convert.ToString(sublength)));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 15
0
        public static string UpdateMandateModeMethod(UpdateSelectModeModal MData)
        {
            QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities();
            List <UpdateSelectModeRes> UpdateSelectModeResList = new List <UpdateSelectModeRes>();

            try
            {
                var Result = dbcontext.MultipleResults("[dbo].[sp_ENach]").With <UpdateSelectModeRes>().
                             Execute("@QueryType", "@MandateId", "@IsPhysical", "@Enach", "@MobileNo", "@EmailId", "@EMandatetype", "@Amount", "@AppId", "@AmountRupeesInWords", "UpdateENach", Dbsecurity.Decrypt(MData.MandateId), MData.Physical, MData.EMandate, MData.MobileNumber, MData.Email, MData.EMandatetype, MData.Amount, Dbsecurity.Decrypt(MData.AppId), MData.AmountRupeesInWords);

                UpdateSelectModeResList = Result[0].Cast <UpdateSelectModeRes>().ToList();
            }
            catch (Exception ex) { }
            return(UpdateSelectModeResList[0].done);
        }
 //To Add new employee record
 public IEnumerable <Custodian> AddCustodian(Custodian custodian, string UserId)
 {
     try
     {
         string isActive = (custodian.Active == true ? "1" : "0");
         var    Result   = context.MultipleResults("[dbo].[FAMS_Custodian]").With <Custodian>().Execute("@QueryType", "@CountryCode", "@CustodianCode", "@CustodianName", "@PMSCode", "@PMSName", "@PMSAccountNumber", "@Active", "@UserId", "SaveCustodian", custodian.CountryCode, custodian.CustodianCode, custodian.CustodianName, custodian.PMSCode, custodian.PMSName, custodian.PMSAccountNumber, isActive, Dbsecurity.Decrypt(UserId));
         foreach (var _custodian in Result)
         {
             //Flag = employe.Cast<ResFlag>().ToList() .Select(x=>x.Responseflag).First().ToString();
             dataList_Custodian = _custodian.Cast <Custodian>().ToList();
         }
         return(dataList_Custodian);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 17
0
 //To Add new employee record
 public IEnumerable <City> UpdateCity(City City, string UserId, string CityId)
 {
     try
     {
         var Result = context.MultipleResults("[dbo].[FAMS_City]").With <City>().Execute("@QueryType", "@CityCode", "@CityName", "@CountryCode", "@StateCode", "@UserId", "@CityId", "UpdateCity", City.CityCode, City.CityName, Convert.ToString(City.CountryCode), Convert.ToString(City.StateCode), Dbsecurity.Decrypt(UserId), CityId);
         foreach (var _city in Result)
         {
             //Flag = employe.Cast<ResFlag>().ToList() .Select(x=>x.Responseflag).First().ToString();
             dataList_City = _city.Cast <City>().ToList();
         }
         return(dataList_City);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public Dictionary <string, object> BindGrid(CommonFields Data)
 {
     try
     {
         var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_BrokerMaster]").With <BindAllFields>().With <BindAllFields2>().Execute("@QueryType", "@UserId", "BindGrid", Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(Data.UserId.Replace("_", "%")))));
         return(results);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public static EMandateTypeDataList Selectdata(SelectModeModal MData)
        {
            EMandateTypeDataList       res       = new EMandateTypeDataList();
            QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities();

            try
            {
                var Result = dbcontext.MultipleResults("[dbo].[Sp_GetMandatemodeData]").With <EMandateTypeDataModal>().
                             Execute("@QueryType", "@MandateId", "@Appid", "GetMandatemode", Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.AppId));

                res.EMandateTypeDataModalList = Result[0].Cast <EMandateTypeDataModal>().ToList();
            }
            catch (Exception ex) { }
            return(res);
        }
Exemplo n.º 20
0
        public Dictionary <string, object> SaveData(JsonAllFields Data)
        {
            string Active = "";

            if (Data.Active == true)
            {
                Active = "1";
            }
            else
            {
                Active = "0";
            }
            FAMSEntities context = new FAMSEntities();

            try
            {
                string Password = string.Empty;
                Password = Dbsecurity.Encrypt(Data.Emailid.Split('@').ElementAtOrDefault(0));
                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_PMSEmployees]").With <CommonFields>()
                                             .Execute("@Querytype", "@EmployeeCode", "@EmployeeName", "@Gender", "@About", "@Custodian", "@CustomerCode", "@CustomerName", "@EmpLinkingDate", "@Qualification", "@InceptionDate", "@PMSEmpId", "@Active", "@UserId", "@EmailId", "@Password", "SaveEmployee", Data.EmployeeCode, Data.EmployeeName, Data.Gender,
                                                      Data.About, Data.Custodian, Data.CustomerCode, Data.CustomerName, Data.EmpLinkingDate, Data.Qualification, Data.InceptionDate, Data.PMSEmpId, Active, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(Data.UserId.Replace("_", "%"))), Data.Emailid, Password));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 21
0
 //To Add new employee record
 public IEnumerable <SchemaMaster> UpdateSchemaMaster(SchemaMaster SchemaMaster, string UserId, string SchemaMasterId)
 {
     try
     {
         //var Result = context.MultipleResults("[dbo].[FAMS_SchemeMaster]").With<SchemaMaster>().Execute("@QueryType", "@PMSCode", "@PMSName", "@PMSAccountNumber", "@UserId", "@PMSId", "UpdatePMS", SchemaMaster.PMSCode, SchemaMaster.PMSName, SchemaMaster.PMSAccountNumber, Dbsecurity.Decrypt(UserId), PMSId);
         //var Result = context.MultipleResults("[dbo].[FAMS_SchemeMaster]").With<SchemaMaster>().Execute("@QueryType", "@PMSCode", "@CustodianCode", "@SchemaNumber","", "@UserId", "UpdateSchemeMaster", SchemaMaster.PMSCode, SchemaMaster.CustodianCode, SchemaMaster.SchemeNumber, Dbsecurity.Decrypt(UserId), SchemeMasterId);
         var Result = context.MultipleResults("[dbo].[FAMS_SchemeMaster]").With <SchemaMaster>().Execute("@QueryType", "@PMSCode", "@CustodianCode", "@SchemaNumber", "@UserId", "@SchemaMasterId", "UpdateSchemeMaster", SchemaMaster.PMSCode, SchemaMaster.CustodianCode, SchemaMaster.SchemaNumber, Dbsecurity.Decrypt(UserId), SchemaMasterId);
         foreach (var _state in Result)
         {
             //Flag = employe.Cast<ResFlag>().ToList() .Select(x=>x.Responseflag).First().ToString();
             dataList_SchemaMaster = _state.Cast <SchemaMaster>().ToList();
         }
         return(dataList_SchemaMaster);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 //To Add new employee record
 public IEnumerable <PMSMaster> AddPMSMaster(PMSMaster PMSMaster, string UserId)
 {
     try
     {
         //var Result = context.MultipleResults("[dbo].[FAMS_PMS]").With<PMSMaster>().Execute("@QueryType", "@DesignationCode", "@DesignationName", "@UserId", "SavePMS", Designation.DesignationCode, Designation.DesignationName, Dbsecurity.Decrypt(UserId));
         var Result = context.MultipleResults("[dbo].[FAMS_PMS]").With <PMSMaster>().Execute("@QueryType", "@PMSCode", "@PMSName", "@PMSAccountNumber", "@UserId", "SavePMS", PMSMaster.PMSCode, PMSMaster.PMSName, PMSMaster.PMSAccountNumber, Dbsecurity.Decrypt(UserId));
         foreach (var _state in Result)
         {
             //Flag = employe.Cast<ResFlag>().ToList() .Select(x=>x.Responseflag).First().ToString();
             dataList_PMSMaster = _state.Cast <PMSMaster>().ToList();
         }
         return(dataList_PMSMaster);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 23
0
        public BindResponseDataCorporate BindDataCorporate(BindJsonData obj2)
        {
            try
            {
                BindResponseDataCorporate res = new BindResponseDataCorporate();
                //CountResponseData res = new CountResponseData();

                List <BindCorporateRole> GridBindlist1 = new List <BindCorporateRole>();



                var Result = dbcontext.MultipleResults("[dbo].[Sp_CreateUser]").With <BindCorporateRole>().
                             Execute("@QueryType", "@EntityId", "@AppId", "@SearchText", "BindUserRoles", Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj2.EntityId.Replace("_", "%"))), Dbsecurity.Decrypt(obj2.AppId), obj2.SearchText);


                res.GridBindlist1 = Result[0].Cast <BindCorporateRole>().ToList();


                return(res);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public Dictionary <string, object> BindGrid(string UserId)
        {
            FAMSEntities context = new FAMSEntities();

            try
            {
                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_user]").With <CustomerDetails>().Execute("@QueryType", "@UserId", "BindUser", Dbsecurity.Decrypt(UserId).ToString()));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 25
0
        public SaveResponseData SaveRole(SaveRoleData savedata)
        {
            try
            {
                SaveResponseData res = new SaveResponseData();


                List <SaveRoleData> SaveRoleList = new List <SaveRoleData>();



                var Result = dbcontext.MultipleResults("[dbo].[Sp_CreateUser]").With <SaveRoleData>().
                             Execute("@QueryType", "@Id", "@RoleID", "@UserId", "SaveUserRole", savedata.UserId.ToString(), savedata.RoleID.ToString(), Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(savedata.CreatedBy.Replace("_", "%"))));


                res.SaveRoleList = Result[0].Cast <SaveRoleData>().ToList();


                return(res);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 26
0
 public Dictionary <string, object> BindGrid1(JsonUserDetails Data)
 {
     try
     {
         var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_NotesMaster]").With <NoteMasterDetails>().Execute("@QueryType", "@UserId", "@Searchvalue", "BindGridSearch", Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(Data.UserId.Replace("_", "%"))), Data.Searchvalue.Trim()));
         return(results);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public Dictionary <string, object> SaveData(JsonData Data)
 {
     try
     {
         if (Data.BMId == "")
         {
             var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_BrokerMaster]").With <CommonFields>().Execute("@QueryType", "@BrokerName", "@TradeName", "@RegistrationNo", "@GSTNo", "@StockExchangeName", "@Email", "@Telephone", "@ContactEmail", "@Phone", "@Extension", "@MobileNo", "@ContactPerson", "@UserId", "SaveData",
                                                                                                                           Data.BrokerName, Data.TradeName, Data.RegistrationNo, Data.GSTNo, Data.StockExchangeName, Data.Email, Data.Telephone, Data.ContactEmail, Data.Phone, Data.Extension, Data.MobileNo, Data.ContactPerson, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(Data.UserId.Replace("_", "%")))));
             return(results);
         }
         else
         {
             var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_BrokerMaster]").With <CommonFields>().Execute("@QueryType", "@BrokerName", "@TradeName", "@RegistrationNo", "@GSTNo", "@StockExchangeName", "@Email", "@Telephone", "@ContactEmail", "@Phone", "@Extension", "@MobileNo", "@ContactPerson", "@BMId", "@UserId", "UpdateData",
                                                                                                                           Data.BrokerName, Data.TradeName, Data.RegistrationNo, Data.GSTNo, Data.StockExchangeName, Data.Email, Data.Telephone, Data.ContactEmail, Data.Phone, Data.Extension, Data.MobileNo, Data.ContactPerson, Data.BMId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(Data.UserId.Replace("_", "%")))));
             return(results);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 28
0
        public Dictionary <string, object> BindDefaultData(string CustomerAccount, string GUserId)
        {
            FAMSEntities context = new FAMSEntities();

            try
            {
                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_TransactionStatement]").With <TransactionStatement_Default>()
                                             .Execute("@Querytype", "@CustomerAccount", "@GUserId", "GetDefault_TransactionStatemenet", CustomerAccount, Dbsecurity.Decrypt(GUserId.Replace(" ", "+"))));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 29
0
        public Dictionary <string, object> BindCustomers(Fields Data)
        {
            FAMSEntities context = new FAMSEntities();

            try
            {
                var results = Common.Getdata(context.MultipleResults("[dbo].[Sp_PMSEmployees]").With <BindAllCustomersFields>()
                                             .Execute("@Querytype", "@PMSEmpId", "@UserId", "BindCustomers", Data.PAMSEmpId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(Data.UserId.Replace("_", "%")))));
                return(results);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 //To Add new employee record
 public IEnumerable <PMSCustomerList> AddCustomerListDetails(PMSCustomerList pMSCustomerList, string UserId)
 {
     try
     {
         string ISEnable = (pMSCustomerList.Enable == true ? "1" : "0");
         var    Result   = context.MultipleResults("[dbo].[FAMS_PMSCustomerList]").With <PMSCustomerList>().Execute("@QueryType", "@CustodianCode", "@ListCode", "@Enable", "@CustomerAccount", "@CustomerName", "@PortfolioCode", "@InceptionDate", "@PMSEmployeeCode", "@UserId", "SaveCustomerLists", pMSCustomerList.CustodianCode, pMSCustomerList.ListCode, ISEnable, pMSCustomerList.CustomerAccount, pMSCustomerList.CustomerName, pMSCustomerList.PortfolioCode, pMSCustomerList.InceptionDate, pMSCustomerList.EmployeeCode, Dbsecurity.Decrypt(UserId));
         foreach (var _pMSCustomerList in Result)
         {
             //Flag = employe.Cast<ResFlag>().ToList() .Select(x=>x.Responseflag).First().ToString();
             dataList_PMSCustomerList = _pMSCustomerList.Cast <PMSCustomerList>().ToList();
         }
         return(dataList_PMSCustomerList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }