Ejemplo n.º 1
0
        private void btnApprove_Clicked(object sender, EventArgs e)
        {
            string DocumentName = "PI";

            string   SignedBy   = getUserName;
            DateTime SignedDate = DateTime.Now.Date;
            string   SignTitle  = "";
            string   SignedPCID = "";

            int insertRslt = ApprovalManager.InsertSgnatureLOg(CompanyName, DocNo, SignedBy, SignedDate, SignTitle, SignedPCID, DocumentName);

            if (insertRslt > 0)
            {
                int updateApproval = ApprovalManager.UpdatePIApprvalStatus(CompanyName, DocNo);
                getCurrentApprovalLevel = "0";
                DateTime ApproveTime = DateTime.Now.Date;
                int      approvalSet = ApprovalManager.UpdateApprovalStatus(CompanyName, DocNo, getCurrentApprovalLevel, getUserName, ApproveTime, SignedPCID);

                if (approvalSet > 0)
                {
                    string module = "Sales And Marketing";
                    string action = "New PI  has been signed digitaly, PI No: " + DocNo + "";
                    Admin_ActionLogManager.SendActionLog(CompanyName, action, module, getUserName, DocNo);
                }

                //for refreshing dashboard
                MessagingCenter.Send <App>((App)Application.Current, "OnApproval");
                //closing Popup
                ApprovalFinalizing(DocNo);
            }
        }
Ejemplo n.º 2
0
        private void btnApprove_Clicked(object sender, EventArgs e)
        {
            int      approvalSet     = 0;
            string   currentReqLevel = "1";
            DateTime ApproveTime     = DateTime.Now;
            string   userIP          = "";
            int      DOStatus        = 0;
            string   status          = "Approved";

            if (DOType == "ADVANCE DO")
            {
                DOStatus = ApprovalManager.UpdateAdvanceDoStatus(DocNo, LCNo, CompanyName, status);
            }
            else
            {
                DOStatus = ApprovalManager.UpdateDoStatus(DocNo, LCNo, CompanyName, status);
            }

            approvalSet = ApprovalManager.UpdateApprovalStatus(CompanyName, DocNo, currentReqLevel, getUserName, ApproveTime, userIP);

            if (approvalSet > 0)
            {
                string module      = "Sales And Marketing";
                string actionDocNo = DocNo;
                string action      = "DO  has been Approved by" + getUserName + ", DONo: " + DocNo + "";
                Admin_ActionLogManager.SendActionLog(CompanyName, action, module, getUserName, actionDocNo);
            }

            //for refreshing dashboard
            MessagingCenter.Send <App>((App)Application.Current, "OnApproval");
            //closing Popup
            ApprovalFinalizing(DocNo);
        }
Ejemplo n.º 3
0
        private void btnApprove_Clicked(object sender, EventArgs e)
        {
            string documentName = "ADV_DEL_REQ";

            DateTime reqTime     = DateTime.Now;
            DateTime ApproveTime = DateTime.Now;
            string   userIP      = "";
            bool     digitalSign = true;
            int      InqappReq   = 0;
            int      approvalSet = 0;

            string advStatus    = "Approved";
            string myAppLevel   = "";
            string nextAppLevel = "";
            string reqTo        = "";
            string reqLevel     = "";
            int    insertrslt   = 0;

            approvalSet = ApprovalManager.UpdateApprovalStatus(CompanyName, DocNo, CurrentReqLevel, getUserName, ApproveTime, userIP);

            DataTable appbodydt = InquiryApprovalManager.GetApprovalLevelhierarchy(CompanyName, CurrentReqLevel, documentName);


            if (appbodydt.Rows.Count > 0)
            {
                for (int x = 0; x < appbodydt.Rows.Count; x++)
                {
                    myAppLevel   = appbodydt.Rows[x]["ApprovalLevel"].ToString();
                    nextAppLevel = appbodydt.Rows[x]["NextLevel"].ToString();
                    reqTo        = appbodydt.Rows[x]["reqTo"].ToString();

                    reqLevel = nextAppLevel;


                    if (approvalSet > 0 && CurrentReqLevel != "3")
                    {
                        InqappReq = InquiryApprovalManager.InsertMarketingApprovalLog(CompanyName, documentName, DocNo, reqTo, reqTime, getUserName, reqLevel, userIP, digitalSign);
                    }
                    else if (approvalSet > 0 && CurrentReqLevel == "3")
                    {
                        insertrslt = ADO_Manager.UpdateAdvanceStatus(CompanyName, DocNo, advStatus);
                    }
                }
            }
            if (insertrslt != 0)
            {
                string module = "Sales And Marketing";
                string action = "Advance DO request  has been signed by " + getUserName + ", Advance No: " + DocNo + "";
                Admin_ActionLogManager.SendActionLog(CompanyName, action, module, getUserName, DocNo);
            }

            //for refreshing dashboard
            MessagingCenter.Send <App>((App)Application.Current, "OnApproval");
            //closing Popup
            ApprovalFinalizing(DocNo);
        }