Exemple #1
0
        protected override void OnAppearing()
        {
            decimal TotalQnty, TotalAmount = 0;

            base.OnAppearing();
            DataTable dt = ADO_Manager.GetADO_ReqDetails(CompanyName, DocNo);

            var doDetailList = ADODM.ADO_DetailList(dt);

            if (dt.Rows.Count > 0)
            {
                TotalQnty   = decimal.Parse(dt.Compute("Sum(Quantity)", "").ToString());
                TotalAmount = decimal.Parse(dt.Compute("Sum(TotalAmount)", "").ToString());

                lblTotalAmount.Text = "Total qty:   " + TotalQnty.ToString("0.00") + "   Amount: " + TotalAmount.ToString("0.00");
                lblADOReqNo.Text    = dt.Rows[0]["AdvNO"].ToString();
            }
            foreach (var item in doDetailList)
            {
                items.Add(item);
            }


            ADOReq_DetailList.ItemsSource = items;
        }
Exemple #2
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);
        }
Exemple #3
0
        private void GetDataByUser()
        {
            DataTable dt = ADO_Manager.GetAllUnApprovedAdvReqByUser(getUserName);

            var DODetaillist = ADODM.ADO_DetailList(dt);

            foreach (var item in DODetaillist)
            {
                items.Add(item);
            }
        }