Пример #1
0
        protected override void OnAppearing()
        {
            decimal TotalQnty, TotalAmount = 0;

            base.OnAppearing();
            DataTable dt = DelSch_Manager.GetDatewiseDeliveryScheduleBySchNo(SchDate, DocNo);

            var Alt_doDetailList = DSM.DelSch_DetailList(dt);

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

                lblTotalAmount.Text = "Total qty:   " + TotalQnty.ToString("0.00") + "   Amount: " + TotalAmount.ToString("0.00");
                lblDocumentNo.Text  = dt.Rows[0]["DocumentNo"].ToString();
            }
            foreach (var item in Alt_doDetailList)
            {
                items.Add(item);
            }
            DelSch_DetailList.ItemsSource = items;
        }
Пример #2
0
        private void btnApprove_Clicked(object sender, EventArgs e)
        {
            int      approvalSet     = 0;
            string   companyName     = "";
            string   currentReqLevel = "1";
            DateTime ApproveTime     = DateTime.Now;
            string   userIP          = "";

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

            DelSch_Manager.UpdateDeliverySchedule(DocNo, SchDate);


            if (approvalSet > 0)
            {
                string module = "Sales and Marketting";
                string action = "Delivery Schedule has been Approved by" + getUserName + ", ScheduleNo: " + DocNo + "";
                Admin_ActionLogManager.SendActionLog(companyName, action, module, getUserName, DocNo);
            }
            //for refreshing dashboard
            MessagingCenter.Send <App>((App)Application.Current, "OnApproval");
            //closing Popup
            ApprovalFinalizing(DocNo);
        }