Ejemplo n.º 1
0
        public ActionResult AddClarification(ClarificationModelList contact)
        {
            Bprocess = new BirthProcessAction();
            int Custid = Convert.ToInt32(Session["Cust_ID"]);

            for (int i = 0; i < contact.RegistrationForm.Count; i++)
            {
                int id = contact.RegistrationForm[i].ID;


                string   result = Bprocess.edit(contact.RegistrationForm[i], 1, Custid, contact.RegistrationForm[i].FormType);
                string[] line   = result.Split('|');
                string   Rt     = line[0].ToString();
                string   Appno  = line[1].ToString();

                int Roleid = Convert.ToInt16(Session["SortedList1"]);


                string FormType_1 = contact.RegistrationForm[i].BnDType.ToString();

                Session["AppNo"] = FormType_1 + "_" + Appno;

                if (Rt == "Update Successfully")
                {
                    string fileSavePath = Server.MapPath("~/UploadedFiles/");
                    BR_ID = Convert.ToInt16(Session["BirthRegister_ID"]);

                    string rt = Utility.Util.EditDocuments(Request, contact.DocList, fileSavePath,
                                                           FormType_1 + "_" + Appno, Custid);
                }
            }
            return(RedirectToAction("Dashboard", "DashBoard"));
        }
        public ActionResult BirthRegistration(BirthProcess BRobject, HttpPostedFileBase httpPostedFileBase)
        {
            int id = BRobject.ID;

            if (string.IsNullOrEmpty(BRobject.DocumentType))
            {
                ModelState.AddModelError("DocumentType", "Please Select Document Type");
            }

            obj = new BirthProcessAction();
            int Custid = Convert.ToInt32(Session["Cust_ID"]);
            //Commented the lines below - Soumendu
            //
            //if (BRobject.CustomerGender == "Female")
            //    {
            //        BRobject.Name_of_Mother = BRobject.CustomerName;
            //    }
            //else
            //    {
            //        BRobject.Name_of_Father = BRobject.CustomerName;
            //    }
            string result = obj.create(BRobject, 1, Custid, BRobject.FormType);

            string[] line       = result.Split('|');
            string   Rt         = line[0].ToString();
            string   Appno      = line[1].ToString();
            string   FormType_1 = BRobject.FormType;

            Session["AppNo"] = FormType_1 + "_" + Appno;

            Clear();
            int Roleid = Convert.ToInt16(Session["SortedList1"]);
            int CustID = Convert.ToInt32(Session["Cust_ID"].ToString());

            if (Rt == "Registered Successfully")
            {
                string fileSavePath = HttpContext.Server.MapPath("~/UploadedFiles/");

                string rt = Utility.Util.AddDocuments(Request, BRobject.DocList, fileSavePath,
                                                      FormType_1 + "_" + Appno, CustID);

                string AppNo = FormType_1 + "_" + Appno;
                List <MailNotification> MailInfo = obj.getMailInfo("BirthApplied", AppNo);
                for (int i = 0; i < MailInfo.Count; i++)
                {
                    Utility.Util.INotificationService mailNotification = new Utility.Util.MailService
                                                                             ("*****@*****.**", MailInfo[i].Subject, MailInfo[i].MailAppNo);
                    mailNotification.Notify();
                }



                Message();
            }

            TempData["Viewstr"]      = Session["ViewData"].ToString();
            TempData["ErrorMessage"] = "Your application has been register succesfully." +
                                       "\n Your application id no:" + Appno;
            return(RedirectToAction("Index", "Login"));
        }
Ejemplo n.º 3
0
        public ActionResult Rejection(int id, string BnDType)
        {
            ClarificationModelList CmodelList = new ClarificationModelList();

            CmodelList.Attaken = new ActionTaken();
            string ProcessNo = null;

            int CustId = Convert.ToInt32(Session["Cust_ID"]);
            BirthProcessAction Bprocess = new BirthProcessAction();

            string Clarifications = Bprocess.CheckClarification(id, CustId);

            string[]      SplitStringLine   = Clarifications.Split(',', '|');
            List <string> ClarificationList = new List <string>();

            foreach (string List in SplitStringLine)
            {
                ClarificationList.Add(List);
            }
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (var item in ClarificationList)
            {
                sb.Append(item + "\n");
            }
            var str = new HtmlString(sb.ToString());


            #region Show birth/Death Page
            CmodelList.RegistrationForm = Bprocess.GetDataofparticularprocess(id);
            CmodelList.Clarification    = str.ToString();
            #endregion

            #region  Show identity Documents file
            CmodelList.Attaken.viewIdentityDocument = Bprocess.ShowIdentityDocumentList(id.ToString());
            #endregion

            #region  Show BnD related files
            ProcessNo = BnDType + "_" + id;
            CmodelList.Attaken.viewBnDDocument = Bprocess.ShowBnDDocumentList_1(ProcessNo);
            #endregion

            #region Show Document list related to birth or Death Specific
            if (BnDType == "BR")
            {
                CmodelList.DocList = Bprocess.DocumentList(1); //1 is process id
            }
            else
            {
                CmodelList.DocList = Bprocess.DocumentList(2); //2 is process id
            }
            #endregion

            #region show all Comments History

            CmodelList.Attaken.ShowAllComments = Bprocess.GetAllCommentsdata(id);

            #endregion
            return(View(CmodelList));
        }
Ejemplo n.º 4
0
        public ActionResult AddAction(int BR_ID, string Message, string Type)
        {
            ActionTaken At = new ActionTaken();

            string custid = Session["Cust_ID"].ToString();

            if (Message != null)
            {
                Session["BirthRegister_ID"] = BR_ID;
                BirthProcessAction Bprocess = new BirthProcessAction();

                #region Show all data of Birth/Death Process
                At.Showall = Bprocess.GetDataofparticularprocess(BR_ID);
                #endregion

                #region Showall comments During verification
                At.ShowAllComments = Bprocess.GetAllCommentsdata(BR_ID);
                #endregion

                #region show all files loaded in Sql
                At.ShowallMessage = Bprocess.FileLoadMessage(Message);
                #endregion

                #region all Recomend/ clarification Comments
                At.Allrecomendedvarification = Bprocess.AddrecomendVerification();
                #endregion

                #region Appeal doc
                At.Appdoc = Bprocess.ShowAppealdate(BR_ID.ToString());


                #endregion

                At.BnDType = Type;
                return(View(At));
            }
            else
            {
                Session["BirthRegister_ID"] = BR_ID;
                BirthProcessAction Bprocess = new BirthProcessAction();
                At.Showall                   = Bprocess.GetDataofparticularprocess(BR_ID);
                At.ShowAllComments           = Bprocess.GetAllCommentsdata(BR_ID);
                At.Allrecomendedvarification = Bprocess.AddrecomendVerification();
                string ProcessNo = Type + "_" + BR_ID;

                At.viewIdentityDocument = Bprocess.ShowIdentityDocumentList(BR_ID.ToString());

                At.viewBnDDocument = Bprocess.ShowBnDDocumentList_1(ProcessNo);

                At.RoleName = Session["RoleDesc"].ToString();
                #region Appeal doc
                At.Appdoc = Bprocess.ShowAppealdate(ProcessNo);


                #endregion
                return(View(At));
            }
        }
Ejemplo n.º 5
0
        public JsonResult GetCountries()
        {
            // ActionTaken At = new ActionTaken();
            BirthProcessAction Bprocess = new BirthProcessAction();
            //At.Allrecomendedvarification =
            List <Tbl_Clarification_Master> objCnt = Bprocess.AddrecomendVerification();

            return(Json(objCnt));
        }
Ejemplo n.º 6
0
        public ActionResult EditPending(string id, string BndType)
        {
            BirthProcessAction EmpRepo = new BirthProcessAction();

            ModelState.Clear();

            return(RedirectToAction("ShowData", new RouteValueDictionary
                                        (new { controller = "Dashboard", action = "ShowData", actionname = id, BnDType = BndType })));
        }
Ejemplo n.º 7
0
        public ActionResult AddRejection(ClarificationModelList AppealContact)
        {
            Bprocess = new BirthProcessAction();

            for (int i = 0; i < AppealContact.RegistrationForm.Count; i++)
            {
                int    id     = AppealContact.RegistrationForm[i].ID;
                int    Custid = Convert.ToInt32(Session["Cust_ID"]);
                string Appno  = id.ToString();

                int Roleid = Convert.ToInt16(Session["SortedList1"]);


                string FormType_1 = AppealContact.RegistrationForm[i].BnDType.ToString();

                Session["AppNo"] = FormType_1 + "_" + Appno;


                string fileSavePath = Server.MapPath("~/UploadedFiles/");

                BR_ID = AppealContact.RegistrationForm[0].ID;

                Tbl_Document_List tblObj = new Tbl_Document_List();

                tblObj.Docname = AppealContact.AppealDoc.AppealFileName;

                List <Tbl_Document_List> list = new List <Tbl_Document_List>();

                list.Add(tblObj);

                string messageappeal = AppealContact.AppealDoc.AppealComment;


                //Appeal Applied
                string Insertresult = Bprocess.AddDataComments(BR_ID, "", "AppealRejection", "", 0);

                string rt = Utility.Util.AddAppealDocument(Request, list, fileSavePath,
                                                           FormType_1 + "_" + Appno, Custid, messageappeal);

                string BR_IDstr = AppealContact.RegistrationForm[0].BnDType + "_" + BR_ID;
                List <MailNotification> MailInfo = Bprocess.getMailInfo("BirthAppealtoApprover", BR_IDstr.ToString());
                for (int k = 0; k < MailInfo.Count; k++)
                {
                    Utility.Util.INotificationService mailNotification = new Utility.Util.MailService
                                                                             ("*****@*****.**", MailInfo[k].Subject, MailInfo[k].MailAppNo);
                    mailNotification.Notify();
                }
            }


            return(RedirectToAction("Dashboard", "DashBoard"));
        }
Ejemplo n.º 8
0
        public ActionResult AjaxPostCall(ActionTaken CommentData)
        {
            int                BR_ID    = Convert.ToInt16(Session["BirthRegister_ID"]);
            string             UserName = Session["U_Name"].ToString();
            int                UserId   = Convert.ToInt16(Session["U_ID"]);
            string             Action   = CommentData.Action;
            string             comments = CommentData.Comments;
            BirthProcessAction Bprocess = new BirthProcessAction();

            //insert all comment data in database
            string Insertresult = Bprocess.AddDataComments(BR_ID, UserName, Action, comments, UserId);

            return(RedirectToAction("Dashboard", "DashBoard"));
        }
Ejemplo n.º 9
0
        public ActionResult Clarification(int id, string BnDType, string Next)
        {
            ClarificationModelList CmodelList = new ClarificationModelList();

            CmodelList.Attaken = new ActionTaken();

            int CustId = Convert.ToInt32(Session["Cust_ID"]);
            BirthProcessAction Bprocess       = new BirthProcessAction();
            string             Clarifications = Bprocess.CheckClarification(id, CustId);

            string[]      SplitStringLine   = Clarifications.Split(',', '|');
            List <string> ClarificationList = new List <string>();

            foreach (string List in SplitStringLine)
            {
                ClarificationList.Add(List);
            }
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (var item in ClarificationList)
            {
                sb.Append(item + "\n");
            }
            var str = new HtmlString(sb.ToString());

            CmodelList.RegistrationForm = Bprocess.GetDataofparticularprocess(id);
            CmodelList.Clarification    = str.ToString();


            CmodelList.Attaken.viewIdentityDocument = Bprocess.ShowIdentityDocumentList(id.ToString());

            string ProcessNo = BnDType + "_" + id;

            //CmodelList.viewBnDDocument = Bprocess.ShowBnDDocumentList();
            CmodelList.Attaken.viewBnDDocument = Bprocess.ShowBnDDocumentList_1(ProcessNo);

            if (BnDType == "BR")
            {
                CmodelList.DocList = Bprocess.DocumentList(1); //1 is process id
            }
            else
            {
                CmodelList.DocList = Bprocess.DocumentList(2); //2 is process id
            }
            return(View(CmodelList));
        }
Ejemplo n.º 10
0
        public ActionResult ShowData(string actionname, string BnDType)
        {
            string       name     = actionname;
            string       type     = BnDType;
            BirthProcess Bprofile = new BirthProcess();

            string[] line = actionname.Split('|');
            string   sts  = line[0].ToString();

            Bprofile.Status = sts;

            Bprofile.nextAction = actionname;

            BirthProcessAction objDB = new BirthProcessAction(); //calling class DBdata

            Bprofile.ShowallBirthRegis = objDB.GetAllEmployees(name, type);
            return(View(Bprofile));
        }
Ejemplo n.º 11
0
        public ActionResult AjaxRecomendRejectCall(RecommendedRejects RR)
        {
            RejectList          = RR.Action;
            RejectComments      = RR.Comments;
            RejectActionSection = RR.ActionSection;

            BR_ID    = Convert.ToInt16(Session["BirthRegister_ID"]);
            UserName = Session["U_Name"].ToString();
            UserId   = Convert.ToInt16(Session["U_ID"]);
            Bprocess = new BirthProcessAction();

            InsertResult = Bprocess.AddRejectrecomendVerification(BR_ID, UserId, UserName, RejectActionSection, RejectList, RejectComments);

            if (InsertResult != "Approve" || InsertResult != "Clarification" || InsertResult != "RecommendRejection")
            {
                ViewBag.Message = Utility.Util.AltMsg("Verification has been done");
            }
            string BR_IDstr = "_" + Session["BirthRegister_ID"].ToString();

            if (RejectActionSection.Equals("Clarification"))
            {
                List <MailNotification> MailInfo = Bprocess.getMailInfo("Clarification", BR_IDstr.ToString());
                for (int i = 0; i < MailInfo.Count; i++)
                {
                    Utility.Util.INotificationService mailNotification = new Utility.Util.MailService
                                                                             ("*****@*****.**", MailInfo[i].Subject, MailInfo[i].MailAppNo);
                    mailNotification.Notify();
                }
            }
            else if (RejectActionSection.Contains("Rejection"))
            {
                List <MailNotification> MailInfo = Bprocess.getMailInfo("Rejection", BR_IDstr.ToString());
                for (int i = 0; i < MailInfo.Count; i++)
                {
                    Utility.Util.INotificationService mailNotification = new Utility.Util.MailService
                                                                             ("*****@*****.**", MailInfo[i].Subject, MailInfo[i].MailAppNo);
                    mailNotification.Notify();
                }
            }

            return(RedirectToAction("Dashboard", "DashBoard"));
        }
Ejemplo n.º 12
0
        public ActionResult PaymentAddAction(int BR_ID, string Message, string Type)
        {
            ActionTaken At = new ActionTaken();

            if (Message != null)
            {
                Session["BirthRegister_ID"] = BR_ID;
                BirthProcessAction Bprocess = new BirthProcessAction();
                At.Showall         = Bprocess.GetDataofparticularprocess(BR_ID);
                At.ShowAllComments = Bprocess.GetAllCommentsdata(BR_ID);
                At.ShowallMessage  = Bprocess.FileLoadMessage(Message);
                return(View(At));
            }
            else
            {
                Session["BirthRegister_ID"] = BR_ID;
                BirthProcessAction Bprocess = new BirthProcessAction();
                At.Showall         = Bprocess.GetDataofparticularprocess(BR_ID);
                At.ShowAllComments = Bprocess.GetAllCommentsdata(BR_ID);
                At.BnDType         = Type;
                return(View(At));
            }
        }
Ejemplo n.º 13
0
        public ActionResult Dashboard()
        {
            #region variabels
            string         strTmp       = null;
            string         getAction_ID = null;
            string         getAction    = null;
            string         UserPending  = null;
            List <int>     roleidlist   = new List <int>();
            List <RoleMap> RoleMapList  = new List <RoleMap>();
            #endregion

            #region Session variable
            int CustId     = Convert.ToInt32(Session["Cust_ID"]);
            int UserToRole = Convert.ToInt16(Session["SortedList1"]);
            int Userrole   = Convert.ToInt16(Session["U_ID"]);
            #endregion

            #region Objects
            RoleAction         RoletoAction = new RoleAction();
            BirthProcessAction objDB        = new BirthProcessAction();
            BirthProcess       Bprocess     = new BirthProcess();
            #endregion

            RoletoAction.ShowRolltoAction = objDB.GetTbl_Action_MasterId(Userrole, 1);
            Session["RoleDesc"]           = objDB.roleDesc;

            if (RoletoAction.ShowRolltoAction.Count == 0)
            {
                UserPending = objDB.GetAllUsersPending(Userrole);
                return(View("Dummy"));
            }

            UserPending = objDB.GetAllUsersPending(Userrole);

            TempData["Viewstr"] = strTmp;

            #region Differentiate Each role to Action
            foreach (RoleAction ActionRole in RoletoAction.ShowRolltoAction)
            {
                if (UserToRole == ActionRole.RoleId)
                {
                    getAction_ID = ActionRole.ActionId.ToString();
                    getAction_ID = getAction_ID.Trim();
                    getAction    = ActionRole.ActionDesc;
                }
            }
            #endregion

            Bprocess.ShowallBirthRegis = objDB.CountPending(getAction_ID, getAction, CustId);
            Session["ActionId"]        = getAction_ID;
            Session["ActionName"]      = getAction;
            Session["CustomerID"]      = CustId;


            ActionID_Name = getAction + "|" + getAction_ID;
            if (Bprocess.ShowallBirthRegis == null)
            {
                return(View("Dummy"));
            }

            return(View(Bprocess));
        }
Ejemplo n.º 14
0
        public static string AddAppealDocument(HttpRequestBase Request, List <Tbl_Document_List> Doclist,
                                               string fileSavePath, string Appno, int Custid, string messageappeal)
        {
            string results = "";

            if (Request.Files.AllKeys.Length > 0)
            {
                BirthProcessAction obj = new BirthProcessAction();

                for (int k = 0; k < Doclist.Count; k++)
                {
                    try
                    {
                        var DocumentTmp = Doclist[k];
                        var files       = Request.Files;

                        var file = files[k];
                        if (file != null)
                        {
                            var fileName = file.FileName;
                            if (fileName != null && fileName.Trim().Length > 0)
                            {
                                if (fileName.Contains(@"\"))
                                {
                                    fileName = fileName.Substring(fileName.LastIndexOf(@"\"));
                                }
                                string Docname = DocumentTmp.Docname;

                                if (Docname.Equals("Identity Document"))
                                {
                                    Docname = Docname.Replace(" ", "_");
                                }
                                else
                                {
                                    string[] temp = Appno.Split('_');
                                    Docname = "AP";
                                }

                                int    idx          = fileName.LastIndexOf(".");
                                string fileNameTemp = fileName.Substring(0, idx);
                                string extemp       = fileName.Substring(idx);
                                fileNameTemp = fileNameTemp + "_" + Appno;
                                fileName     = fileNameTemp + extemp;

                                fileSavePath = fileSavePath + Docname;
                                if (!Directory.Exists(fileSavePath))
                                {
                                    Directory.CreateDirectory(fileSavePath);
                                }

                                fileSavePath = fileSavePath + "\\" + fileName;


                                //populate DocumentTmp
                                DocumentTmp.DocFilePath = fileSavePath;
                                DocumentTmp.IsActive    = true;
                                DocumentTmp.BR_ID       = Appno;
                                string Appealmessage =
                                    results = results + obj.InsertAppealDocAtt
                                                  (DocumentTmp.BR_ID, fileName, DocumentTmp.DocFilePath, DocumentTmp.IsActive, messageappeal);
                                file.SaveAs(fileSavePath);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        ex.Message.ToString();
                    }
                }
            }
            return(results);
        }
Ejemplo n.º 15
0
        public static string AddDocuments(HttpRequestBase Request, List <Tbl_Document_List> Doclist,
                                          string fileSavePathMain, string Appno, int Custid)
        {
            string results = "";

            if (Request.Files.AllKeys.Length > 0)
            {
                BirthProcessAction obj = new BirthProcessAction();
                for (int k = 0; k < Doclist.Count; k++)
                {
                    string fileSavePath = fileSavePathMain;//added this-Soumendu
                    var    DocumentTmp  = Doclist[k];
                    var    files        = Request.Files;

                    var file = files[k];
                    if (file != null)
                    {
                        var fileName = file.FileName;
                        if (fileName != null && fileName.Trim().Length > 0)
                        {
                            if (fileName.Contains(@"\"))
                            {
                                fileName = fileName.Substring(fileName.LastIndexOf(@"\"));
                            }
                            string Docname = DocumentTmp.Docname;

                            if (Docname.Equals("Identity Document"))
                            {
                                Docname = Docname.Replace(" ", "_");
                            }
                            else
                            {
                                string[] temp = Appno.Split('_');
                                Docname = temp[0];
                            }

                            int    idx          = fileName.LastIndexOf(".");
                            string fileNameTemp = fileName.Substring(0, idx);
                            string extemp       = fileName.Substring(idx);
                            fileNameTemp = fileNameTemp + "_" + Appno;
                            fileName     = fileNameTemp + extemp;

                            fileSavePath = fileSavePath + Docname;
                            if (!Directory.Exists(fileSavePath))
                            {
                                Directory.CreateDirectory(fileSavePath);
                            }

                            fileSavePath = fileSavePath + "\\" + fileName;


                            //populate DocumentTmp
                            DocumentTmp.DocFilePath = fileSavePath;
                            DocumentTmp.IsActive    = true;
                            DocumentTmp.BR_ID       = Appno;
                            DocumentTmp.Doctype     = Doclist[k].Doctype;
                            results = results + obj.InsertDocumentAttachment(DocumentTmp.BR_ID, fileName,
                                                                             DocumentTmp.DocFilePath, DocumentTmp.Doctype, DocumentTmp.IsActive, Custid);
                            file.SaveAs(fileSavePath);
                        }
                    }
                }
            }
            return(results);
        }