コード例 #1
0
        public string GetPayInfo(string type)
        {
            string          strInfo      = "";
            ContractPayInfo payInfo      = Core.Container.Instance.Resolve <IServiceContractPayInfo>().GetEntity(OrderID);
            ContractInfo    contractInfo = Core.Container.Instance.Resolve <IServiceContractInfo>().GetEntity(payInfo.ContractID);

            switch (type)
            {
            case "1":
                strInfo = string.Format("{0}|{1}", contractInfo.CustomerName, contractInfo.ProjectName);
                break;

            case "2":
                strInfo = string.Format("日期:{0}", payInfo.ApplyDate);
                break;

            case "3":
                strInfo = string.Format("经手人:{0}", payInfo.Operator);
                break;

            case "4":
                strInfo = payInfo.PayWay;
                break;

            case "5":
                strInfo = payInfo.PayMoney.ToString();
                break;

            case "6":
                strInfo = payInfo.Remark;
                break;
            }

            return(strInfo);
        }
コード例 #2
0
        private void SetSelectedUsersEnableStatus(bool enabled)
        {
            // 在操作之前进行权限检查
            if (!CheckPower("CorePayApprove"))
            {
                CheckPowerFailWithAlert();
                return;
            }

            // 从每个选中的行中获取ID(在Grid1中定义的DataKeyNames)
            List <int> ids = GetSelectedDataKeyIDs(Grid1);

            // 执行数据库操作
            foreach (int id in ids)
            {
                ContractPayInfo payInfo = Core.Container.Instance.Resolve <IServiceContractPayInfo>().GetEntity(id);
                if (payInfo != null)
                {
                    payInfo.ApplyState = enabled ? 2 : 3;
                    payInfo.AproveDate = DateTime.Now.ToString("yyyy-MM-dd");
                    payInfo.AproveUser = User.Identity.Name;
                    Core.Container.Instance.Resolve <IServiceContractPayInfo>().Update(payInfo);
                }
            }
            // 重新绑定表格
            BindGrid();
        }
コード例 #3
0
        private void SaveItem()
        {
            ContractPayInfo contractPayInfo = new ContractPayInfo();

            ContractInfo contractInfo = Core.Container.Instance.Resolve <IServiceContractInfo>().GetEntity(InfoID);

            contractPayInfo.ApplyDate  = dpStartDate.Text;
            contractPayInfo.Remark     = taRemark.Text;
            contractPayInfo.ContractID = InfoID;
            contractPayInfo.Operator   = User.Identity.Name;
            contractPayInfo.PayMoney   = decimal.Parse(nbHeight.Text);
            contractPayInfo.PayType    = int.Parse(ddlDirection.SelectedValue);
            if (ddlDirection.SelectedValue.Equals("1"))
            {
                contractPayInfo.ApplyState = 2;
                contractPayInfo.PayUser    = string.Format("{0},{1},{2}", contractInfo.ProjectName, contractInfo.CustomerName, contractInfo.ContactPhone);
            }
            else
            {
                contractPayInfo.ApplyState = 1;
                contractPayInfo.PayUser    = ddlGoodType.SelectedValue;
            }
            //商品类型及名称
            contractPayInfo.PayWay = ddlPayType.SelectedValue;
            //保存商品信息
            Core.Container.Instance.Resolve <IServiceContractPayInfo>().Create(contractPayInfo);
            //更新订单收款
            contractInfo.ReturnMoney = CalcCost();
            Core.Container.Instance.Resolve <IServiceContractInfo>().Update(contractInfo);
        }
コード例 #4
0
ファイル: ContractPayAction.cs プロジェクト: zxl881203/src
        public bool insContPayRecord(ContractPayInfo cpi)
        {
            string str  = "";
            object obj2 = str + "insert into EPM_Fund_ContractPay (PrjCode,ContractCode,Reason,ProductValue,PayPercent,PayMoney,PayMode,PayDate,PayType,PayCompany,BankAccounts,AccountBank,ApplyUser) values (";
            object obj3 = string.Concat(new object[] { obj2, "'", cpi.PrjCode, "','", cpi.ContractCode, "','", cpi.Reason, "'," });
            object obj4 = string.Concat(new object[] { obj3, "cast('", cpi.ProductValue, "' as decimal(18,2)),cast('", cpi.PayPercent, "' as decimal(18,2)),cast('", cpi.PayMoney, "' as decimal(18,2)),'", cpi.PayMode, "'," });

            return(publicDbOpClass.NonQuerySqlString(string.Concat(new object[] { obj4, "'", cpi.PayDate, "','", cpi.PayType, "',", cpi.PayCompany, ",'", cpi.BankAccounts, "','", cpi.AccountBank, "','", cpi.ApplyUser, "')" })));
        }
コード例 #5
0
        protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
        {
            StringBuilder sb       = new StringBuilder();
            int           rowIndex = Grid1.SelectedRowIndex;

            hdNO.Text = Grid1.DataKeys[rowIndex][0].ToString();
            ContractPayInfo payInfo = Core.Container.Instance.Resolve <IServiceContractPayInfo>().GetEntity(int.Parse(hdNO.Text));

            hdType.Text = payInfo.PayType.ToString();
        }
コード例 #6
0
ファイル: ContractPayAction.cs プロジェクト: zxl881203/src
        public bool updContPayRecord(ContractPayInfo cpi)
        {
            object obj2 = "update EPM_Fund_ContractPay set Reason = '" + cpi.Reason + "',";
            object obj3 = string.Concat(new object[] { obj2, "ProductValue = cast('", cpi.ProductValue, "' as decimal(18,2))," });
            object obj4 = string.Concat(new object[] { obj3, "PayPercent = ", cpi.PayPercent, "," });
            object obj5 = (string.Concat(new object[] { obj4, "PayMoney = cast('", cpi.PayMoney, "' as decimal(18,2))," }) + "PayMode = '" + cpi.PayMode + "',") + "PayType = '" + cpi.PayType + "',";
            object obj6 = (string.Concat(new object[] { obj5, "PayCompany = ", cpi.PayCompany, "," }) + "BankAccounts = '" + cpi.BankAccounts + "',") + "AccountBank = '" + cpi.AccountBank + "'";

            return(publicDbOpClass.NonQuerySqlString(string.Concat(new object[] { obj6, " where GuidFlow = '", cpi.GuidFlow, "'" })));
        }
コード例 #7
0
        protected void btnDeleteHW_Click(object sender, EventArgs e)
        {
            List <int>      ids     = GetSelectedDataKeyIDs(Grid1);
            ContractPayInfo payInfo = new ContractPayInfo();

            foreach (int id in ids)
            {
                payInfo = Core.Container.Instance.Resolve <IServiceContractPayInfo>().GetEntity(id);
                Core.Container.Instance.Resolve <IServiceContractPayInfo>().Delete(id);
            }
            BindGrid();
            //更新订单售后成本
            CalcCost();
        }
コード例 #8
0
        protected void btnDeleteHW_Click(object sender, EventArgs e)
        {
            List <int>      ids     = GetSelectedDataKeyIDs(Grid1);
            ContractPayInfo payInfo = new ContractPayInfo();

            foreach (int id in ids)
            {
                payInfo = Core.Container.Instance.Resolve <IServiceContractPayInfo>().GetEntity(id);
                if (payInfo.ApplyState == 1)
                {
                    Core.Container.Instance.Resolve <IServiceContractPayInfo>().Delete(id);
                }
                else
                {
                    Alert.Show("已审核通过的订单不能删除!");
                }
            }
            BindGrid();
        }
コード例 #9
0
        private void SaveItem()
        {
            ContractPayInfo contractPayInfo = new ContractPayInfo();

            ContractInfo contractInfo = Core.Container.Instance.Resolve <IServiceContractInfo>().GetEntity(InfoID);

            contractPayInfo.ApplyDate  = dpStartDate.Text;
            contractPayInfo.Remark     = taRemark.Text;
            contractPayInfo.ContractID = InfoID;
            contractPayInfo.Operator   = User.Identity.Name;
            contractPayInfo.PayMoney   = decimal.Parse(nbHeight.Text);
            contractPayInfo.PayType    = 3;
            contractPayInfo.ApplyState = 2;
            contractPayInfo.PayUser    = "";

            //商品类型及名称
            contractPayInfo.PayWay = ddlPayType.SelectedValue;
            //保存商品信息
            Core.Container.Instance.Resolve <IServiceContractPayInfo>().Create(contractPayInfo);
        }
コード例 #10
0
        protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
        {
            int rowIndex = Grid1.SelectedRowIndex;

            hdNO.Text = "0";
            IList <ICriterion> qryList = new List <ICriterion>();

            qryList.Add(Expression.Eq("PayType", 1));
            qryList.Add(Expression.Eq("ContractID", int.Parse(Grid1.DataKeys[rowIndex][0].ToString())));

            Order[] orderList = new Order[1];
            Order   orderli   = new Order("ID", true);

            orderList[0] = orderli;

            ContractPayInfo payInfo = Core.Container.Instance.Resolve <IServiceContractPayInfo>().GetFirstEntityByFields(qryList, orderList);

            if (payInfo != null)
            {
                hdNO.Text = payInfo.ID.ToString();
            }
        }