当前位置: 首页>>代码示例>>C#>>正文


C# SYSModel.SysSQLString类代码示例

本文整理汇总了C#中SYSModel.SysSQLString的典型用法代码示例。如果您正苦于以下问题:C# SysSQLString类的具体用法?C# SysSQLString怎么用?C# SysSQLString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SysSQLString类属于SYSModel命名空间,在下文中一共展示了SysSQLString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UCSalePlanView_SaveEvent

        void UCSalePlanView_SaveEvent(object sender, EventArgs e)
        {
            try
            {
                gvPurchasePlanList.EndEdit();
                List<SysSQLString> listSql = new List<SysSQLString>();
                SysSQLString sysStringSql = new SysSQLString();
                sysStringSql.cmdType = CommandType.Text;
                Dictionary<string, string> dic = new Dictionary<string, string>();//参数

                string sql1 = string.Format(@" Update tb_parts_sale_plan Set [email protected]_suspend,[email protected]_reason,[email protected]_by,
                [email protected]_name,[email protected]_time,[email protected],[email protected]_name where [email protected]_plan_id;");
                dic.Add("is_suspend", chkis_suspend.Checked ? "0" : "1");//选中(中止):0,未选中(不中止):1
                dic.Add("suspend_reason", txtsuspend_reason.Caption.Trim());
                dic.Add("update_by", GlobalStaticObj.UserID);
                dic.Add("update_name", GlobalStaticObj.UserName);
                dic.Add("update_time", Common.LocalDateTimeToUtcLong(DateTime.Now).ToString());
                dic.Add("operators", GlobalStaticObj.UserID);
                dic.Add("operator_name", GlobalStaticObj.UserName);
                dic.Add("sale_plan_id", planId);
                sysStringSql.sqlString = sql1;
                sysStringSql.Param = dic;
                listSql.Add(sysStringSql);
                foreach (DataGridViewRow dr in gvPurchasePlanList.Rows)
                {
                    string is_suspend = "1";
                    if (dr.Cells["is_suspend"].Value == null)
                    { is_suspend = "1"; }
                    if ((bool)dr.Cells["is_suspend"].EditedFormattedValue)
                    { is_suspend = "0"; }
                    else
                    { is_suspend = "1"; }

                    sysStringSql = new SysSQLString();
                    sysStringSql.cmdType = CommandType.Text;
                    dic = new Dictionary<string, string>();
                    dic.Add("is_suspend", is_suspend);
                    dic.Add("sale_plan_id", planId);
                    dic.Add("parts_code", dr.Cells["parts_code"].Value.ToString());
                    string sql2 = "Update tb_parts_sale_plan_p set [email protected]_suspend where [email protected]_plan_id and [email protected]_code;";
                    sysStringSql.sqlString = sql2;
                    sysStringSql.Param = dic;
                    listSql.Add(sysStringSql);
                }
                if (DBHelper.BatchExeSQLStringMultiByTrans("修改采购计划单", listSql))
                {
                    MessageBoxEx.Show("保存成功!");
                    uc.BindgvSalePlanList();
                    deleteMenuByTag(this.Tag.ToString(), uc.Name);
                }
                else
                {
                    MessageBoxEx.Show("保存失败!");
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show("操作失败!");
            }
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:60,代码来源:UCSalePlanView.cs

示例2: LockDocument

 protected override bool LockDocument(string ids)
 {
     ids = ids.Replace(",", "','");
     List<SysSQLString> listSql = new List<SysSQLString>();
     SysSQLString saleBilling = new SysSQLString();//销售开单
     saleBilling.cmdType = CommandType.Text;
     saleBilling.Param = new Dictionary<string, string>();
     saleBilling.sqlString =string.Format( "update tb_parts_sale_billing set [email protected]_lock where sale_billing_id in ({0})",ids);
     saleBilling.Param.Add("is_lock", ((int)DataSources.EnumImportStaus.LOCK).ToString());
     //saleBilling.Param.Add("id", ids);
     listSql.Add(saleBilling);
     SysSQLString maintainSql = new SysSQLString();//维修结算单
     maintainSql.cmdType = CommandType.Text;
     maintainSql.sqlString =string.Format( "update tb_maintain_settlement_info set [email protected]_lock where settlement_id in ({0})",ids);
     maintainSql.Param = new Dictionary<string, string>();
     maintainSql.Param.Add("is_lock", ((int)DataSources.EnumImportStaus.LOCK).ToString());
     //maintainSql.Param.Add("id", ids);
     listSql.Add(maintainSql);
     SysSQLString threeSql = new SysSQLString();//三包服务单
     threeSql.cmdType = CommandType.Text;
     threeSql.sqlString = string.Format("update tb_maintain_three_guaranty_settlement set [email protected]_lock where st_id in ({0})", ids);
     threeSql.Param = new Dictionary<string, string>();
     threeSql.Param.Add("is_lock", ((int)DataSources.EnumImportStaus.LOCK).ToString());
     //threeSql.Param.Add("id", ids);
     listSql.Add(threeSql);
     return DBHelper.BatchExeSQLStringMultiByTrans("锁定应收单据", listSql);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:27,代码来源:frmReceivableByVerif.cs

示例3: btnOK_Click

 //确认,保存到数据库并关闭当前窗体
 private void btnOK_Click(object sender, EventArgs e)
 {
     dgvSet.EndEdit();
     List<SysSQLString> listSql = new List<SysSQLString>();
     bool isCheck = true;
     foreach (DataGridViewRow dgvr in dgvSet.Rows)
     {
         string width = CommonCtrl.IsNullToString(dgvr.Cells[colSetWidth.Name].Value);
         if (width.Length == 0)
         {
             isCheck = false;
             dgvSet.CurrentCell = dgvr.Cells[colSetWidth.Name];
             break;
         }
         SysSQLString sql = new SysSQLString();
         sql.cmdType = CommandType.Text;
         sql.sqlString = @"update tb_report_set set [email protected]_width,[email protected]_show,[email protected]_print where [email protected]_id;";
         sql.Param = new Dictionary<string, string>();
         sql.Param.Add("set_id", dgvr.Cells[colSetID.Name].Value.ToString());
         sql.Param.Add("set_width", dgvr.Cells[colSetWidth.Name].Value.ToString());
         sql.Param.Add("is_show", Convert.ToBoolean(dgvr.Cells[colIsShow.Name].Value)?"1":"0");
         sql.Param.Add("is_print", Convert.ToBoolean(dgvr.Cells[colIsPrint.Name].Value)?"1":"0");
         listSql.Add(sql);
     }
     if (!isCheck)
     {
         return;
     }
     if (DBHelper.BatchExeSQLStringMultiByTrans("", listSql))
     {
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:35,代码来源:frmReportSet.cs

示例4: UCPurchasePlanOrderView_InvalidOrActivationEvent

 /// <summary> 激活/作废
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void UCPurchasePlanOrderView_InvalidOrActivationEvent(object sender, EventArgs e)
 {
     string strmsg = string.Empty;
     List<SysSQLString> listSql = new List<SysSQLString>();
     SysSQLString sysStringSql = new SysSQLString();
     sysStringSql.cmdType = CommandType.Text;
     Dictionary<string, string> dic = new Dictionary<string, string>();//参数
     dic.Add("purchase_order_yt_id", purchase_order_yt_id);//单据ID
     dic.Add("update_by", GlobalStaticObj.UserID);//修改人Id
     dic.Add("update_name", GlobalStaticObj.UserName);//修改人姓名
     dic.Add("update_time", Common.LocalDateTimeToUtcLong(DateTime.Now).ToString());//修改时间               
     if (orderstatus != Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
     {
         strmsg = "作废";
         dic.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString());//单据状态编号
         dic.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.Invalid, true));//单据状态名称
     }
     else
     {
         strmsg = "激活";
         string order_status = string.Empty;
         string order_status_name = string.Empty;
         DataTable dvt = DBHelper.GetTable("获得宇通采购订单的前一个状态", "tb_parts_purchase_order_2_BackUp", "order_status,order_status_name", "purchase_order_yt_id='" + purchase_order_yt_id + "'", "", "order by update_time desc");
         if (dvt != null && dvt.Rows.Count > 0)
         {
             DataRow dr = dvt.Rows[0];
             order_status = CommonCtrl.IsNullToString(dr["order_status"]);
             if (order_status == Convert.ToInt32(DataSources.EnumAuditStatus.Invalid).ToString())
             {
                 DataRow dr1 = dvt.Rows[1];
                 order_status = CommonCtrl.IsNullToString(dr1["order_status"]);
                 order_status_name = CommonCtrl.IsNullToString(dr1["order_status_name"]);
             }
         }
         order_status = !string.IsNullOrEmpty(order_status) ? order_status : Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString();
         if (order_status == Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString())
         { order_status_name = DataSources.GetDescription(DataSources.EnumAuditStatus.NOTAUDIT, true); }
         else if (order_status == Convert.ToInt32(DataSources.EnumAuditStatus.DRAFT).ToString())
         { order_status_name = DataSources.GetDescription(DataSources.EnumAuditStatus.DRAFT, true); }
         dic.Add("order_status", order_status);//单据状态
         dic.Add("order_status_name", order_status_name);//单据状态名称
     }
     sysStringSql.sqlString = "update tb_parts_purchase_order_2 set [email protected]_status,[email protected]_status_name,[email protected]_by,[email protected]_name,[email protected]_time where [email protected]_order_yt_id";
     sysStringSql.Param = dic;
     listSql.Add(sysStringSql);
     if (MessageBoxEx.Show("确认要" + strmsg + "吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
     {
         return;
     }
     if (DBHelper.BatchExeSQLStringMultiByTrans("更新单据状态为" + strmsg + "", listSql))
     {
         MessageBoxEx.Show("" + strmsg + "成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         uc.BindgvYTPurchaseOrderList();
         deleteMenuByTag(this.Tag.ToString(), uc.Name);
     }
     else
     {
         MessageBoxEx.Show("" + strmsg + "失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:64,代码来源:UCYTView.cs

示例5: GetPurchaseOrder

 public static SysSQLString GetPurchaseOrder(string statusName, string importStatus, string ids)
 {
     SysSQLString sql = new SysSQLString();
     sql.cmdType = CommandType.Text;
     sql.Param = new Dictionary<string, string>();
     sql.sqlString = string.Format("update tb_parts_purchase_order set {0}='{1}' where order_id in ({2});", statusName, importStatus, ids);
     return sql;
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:8,代码来源:Financial.cs

示例6: GetMaintainThree

 /// <summary>
 /// 三包结算单
 /// </summary>
 /// <param name="statusName"></param>
 /// <param name="importStatus"></param>
 /// <param name="ids"></param>
 /// <returns></returns>
 public static SysSQLString GetMaintainThree(string statusName, string importStatus, string ids)
 {
     SysSQLString sql = new SysSQLString();
     sql.cmdType = CommandType.Text;
     sql.Param = new Dictionary<string, string>();
     sql.sqlString = string.Format("update tb_maintain_three_guaranty_settlement set {0}='{1}' where st_id in ({2});", statusName, importStatus, ids);
     return sql;
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:15,代码来源:Financial.cs

示例7: GetSaleBilling

 /// <summary>
 /// 销售开单
 /// </summary>
 /// <param name="statusName"></param>
 /// <param name="importStatus"></param>
 /// <param name="ids"></param>
 /// <returns></returns>
 public static SysSQLString GetSaleBilling(string statusName, string importStatus, string ids)
 {
     SysSQLString sql = new SysSQLString();
     sql.cmdType = CommandType.Text;
     sql.Param = new Dictionary<string, string>();
     sql.sqlString = string.Format("update tb_parts_sale_billing set {0}='{1}' where sale_billing_id in ({2});", statusName, importStatus, ids);
     return sql;
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:15,代码来源:Financial.cs

示例8: AddReceivableSqlString

        /// <summary>
        /// 添加收付款sql
        /// </summary>
        /// <param name="list"></param>
        static void AddReceivableSqlString(List<SysSQLString> list, tb_bill_receivable bill)
        {
            SysSQLString sql = new SysSQLString();
            sql.cmdType = CommandType.Text;
            sql.Param = new Dictionary<string, string>();
            sql.Param.Add("payable_single_id", bill.payable_single_id);
            sql.Param.Add("order_num", bill.order_num);//单号
            sql.Param.Add("order_date", Common.LocalDateTimeToUtcLong(DateTime.Now).ToString());//时间
            sql.Param.Add("order_status", ((int)DataSources.EnumAuditStatus.SUBMIT).ToString());//单据状态
            sql.Param.Add("order_type", bill.order_type.ToString());//单据类型
            sql.Param.Add("cust_id", bill.cust_id);
            //sql.Param.Add("cust_code", bill.cust_code);//往来单位
            //sql.Param.Add("cust_name", bill.cust_name);//
            sql.Param.Add("payment_type", bill.payment_type.ToString());//收付款类型
            sql.Param.Add("payment_money", bill.payment_money.ToString());
            sql.Param.Add("dealings_balance", bill.dealings_balance==null ?null :bill.dealings_balance.ToString());
            //sql.Param.Add("bank_of_deposit", bill.bank_of_deposit);//开户银行
            //sql.Param.Add("bank_account", bill.bank_account);//银行账户
            sql.Param.Add("org_id", bill.org_id);//部门
            sql.Param.Add("handle", GlobalStaticObj.UserID);//经办人
            sql.Param.Add("operator", GlobalStaticObj.UserID);//操作人
            //sql.Param.Add("remark", bill.remark);
            sql.Param.Add("create_by", GlobalStaticObj.UserID);
            sql.Param.Add("create_time", Common.LocalDateTimeToUtcLong(DateTime.Now).ToString());
            sql.Param.Add("status", ((int)DataSources.EnumStatus.Start).ToString());
            sql.Param.Add("enable_flag", ((int)DataSources.EnumEnableFlag.USING).ToString());
//            sql.sqlString = @"INSERT INTO [tb_bill_receivable]
//           (payable_single_id,order_num ,order_date,order_status,order_type,cust_id,cust_code,cust_name,payment_type,payment_money,dealings_balance
//,bank_of_deposit,bank_account,org_id,handle,operator,create_by,create_time,status,enable_flag,remark)
//     VALUES
//           (@payable_single_id,@order_num,@order_date,@order_status,@order_type,@cust_id,@cust_code,@cust_name,@payment_type,@payment_money,@dealings_balance
//,@bank_of_deposit,@bank_account,@org_id,@handle,@operator,@create_by,@create_time,@status,@enable_flag,@remark);";
            if (bill.order_type == 0)
            {
                sql.sqlString = @"INSERT INTO [tb_bill_receivable]
           (payable_single_id,order_num ,order_date,order_status,order_type,cust_id,cust_code,cust_name,payment_type,payment_money,dealings_balance
,bank_of_deposit,bank_account,org_id,handle,operator,create_by,create_time,status,enable_flag)
select @payable_single_id,@order_num,@order_date,@order_status,@order_type,@cust_id,cust_code,cust_name,@payment_type,@payment_money,@dealings_balance,
bank_account_person,bank_account,@org_id,@handle,@operator,@create_by,@create_time,@status,@enable_flag from tb_customer
where [email protected]_id";
            }
            else
            {
                sql.sqlString = @"INSERT INTO [tb_bill_receivable]
           (payable_single_id,order_num ,order_date,order_status,order_type,cust_id,cust_code,cust_name,payment_type,payment_money,dealings_balance
,bank_of_deposit,bank_account,org_id,handle,operator,create_by,create_time,status,enable_flag)
select @payable_single_id,@order_num,@order_date,@order_status,@order_type,@cust_id,sup_code,sup_short_name,@payment_type,@payment_money,@dealings_balance,
null,null,@org_id,@handle,@operator,@create_by,@create_time,@status,@enable_flag 
from tb_supplier where sup_id [email protected]_id";
            }
            list.Add(sql);
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:56,代码来源:DBOperation.cs

示例9: UserLoginOut

 public static void UserLoginOut(string UserID, string currAccDbName)
 {
     DateTime dt = DBHelper.GetCurrentTime(currAccDbName);
     long exitTime = Utility.Common.Common.LocalDateTimeToUtcLong(dt);
     SysSQLString sysSqlString;
     List<SysSQLString> list = new List<SysSQLString>();
     sysSqlString = new SysSQLString();
     sysSqlString.cmdType = CommandType.Text;
     sysSqlString.sqlString = "UPDATE [sys_user] set [is_online] = '0' where [user_id]  = '" + UserID + "'";
     list.Add(sysSqlString);
     sysSqlString = new SysSQLString();
     sysSqlString.cmdType = CommandType.Text;
     sysSqlString.sqlString = "UPDATE [sys_log_log] set exit_time=" + exitTime.ToString() + " where exit_time is null and  [user_id] = '" + UserID + "'";
     list.Add(sysSqlString);
     DBHelper.BatchExeSQLStrMultiByTransNoLogNoBackup("系统登出", currAccDbName, list);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:16,代码来源:ClientUser.cs

示例10: DocumentSettlementByBill

 /// <summary>
 /// 计算应收应付单据已结算金额
 /// </summary>
 /// <param name="orderType">应收应付单据类型</param>
 /// <param name="id">应收应付ID</param>
 /// <param name="list">sql列表</param>
 public static void DocumentSettlementByBill(DataSources.EnumOrderType orderType, string id, List<SysSQLString> list)
 {
     SysSQLString sqlSettlement = new SysSQLString();
     sqlSettlement.cmdType = CommandType.StoredProcedure;
     sqlSettlement.Param = new Dictionary<string, string>();
     sqlSettlement.Param.Add("order_id", id);
     sqlSettlement.Param.Add("type", "1");
     if (orderType == DataSources.EnumOrderType.RECEIVABLE)
     {
         sqlSettlement.sqlString = "p_yingshou_jiesuan";
     }
     else
     {
         sqlSettlement.sqlString = "p_yingfu_jiesuan";
     }
     list.Add(sqlSettlement);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:23,代码来源:Financial.cs

示例11: UpdateLastTime

        public void UpdateLastTime(string name, string lastTime)
        {
            List<SysSQLString> listSql = new List<SysSQLString>();
            SysSQLString sqlUpdate = new SysSQLString();
            sqlUpdate.cmdType = CommandType.Text;
            sqlUpdate.Param = new Dictionary<string, string>();
            sqlUpdate.sqlString = string.Format("update sys_config set key_value='{0}' where key_name='{1}'", lastTime, name);
            listSql.Add(sqlUpdate);
            try
            {
                DBHelper.BatchExeSQLStrMultiByTransNoLogNoBackup("", GlobalStaticObj_Server.CommAccCode, listSql);
            }
            catch (Exception e)
            {

            }
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:17,代码来源:SysConfig.cs

示例12: BusinessPrint

 /// <summary>
 /// 业务打印
 /// </summary>
 /// <param name="dgv">要打印的DataGridView</param>
 /// <param name="printObject">打印的对象</param>
 /// <param name="printTitle">打印的标题</param>
 /// <param name="paperSize">打印页面默认大小,null为A4</param>
 /// <param name="listNotPrint">不打印的列名</param>
 public BusinessPrint(DataGridView dgv, string printObject, string printTitle, PaperSize paperSize, List<string> listNotPrint)
 {
     this.printObject = printObject;
     this.printTitle = printTitle;
     this.paperSize = paperSize;
     #region 判断是否有当前用户、当前报表的设置,如果没有则创建
     if (!DBHelper.IsExist("", "tb_report_set", string.Format("set_object='{0}' and set_user='{1}'", printObject, GlobalStaticObj.UserID)))
     {
         List<SysSQLString> listSql = new List<SysSQLString>();
         foreach (DataGridViewColumn dgvc in dgv.Columns)
         {
             if (dgvc.Visible && !string.IsNullOrEmpty(dgvc.DataPropertyName))
             {
                 SysSQLString sql = new SysSQLString();
                 sql.cmdType = CommandType.Text;
                 sql.sqlString = @"insert INTO tb_report_set (set_id,set_num,set_object,set_user,set_name,set_data_name,set_width,is_show,is_print,create_time) 
                                     values (@set_id,@set_num,@set_object,@set_user,@set_name,@set_data_name,@set_width,@is_show,@is_print,@create_time)";
                 sql.Param = new Dictionary<string, string>();
                 sql.Param.Add("set_id", Guid.NewGuid().ToString());
                 sql.Param.Add("set_num", dgvc.Index.ToString());
                 sql.Param.Add("set_object", printObject);
                 sql.Param.Add("set_user", GlobalStaticObj.UserID);
                 sql.Param.Add("set_name", dgvc.HeaderText);
                 sql.Param.Add("set_data_name", dgvc.DataPropertyName);
                 sql.Param.Add("set_width", dgvc.Width.ToString());
                 sql.Param.Add("is_show", "1");
                 if (listNotPrint.Contains(dgvc.Name))
                 {
                     sql.Param.Add("is_print", "0");
                 }
                 else
                 {
                     sql.Param.Add("is_print", "1");
                 }
                 sql.Param.Add("create_time", Common.LocalDateTimeToUtcLong(GlobalStaticObj.CurrentDateTime).ToString());
                 listSql.Add(sql);
             }
         }
         if (listSql.Count > 0)
         {
             DBHelper.BatchExeSQLStringMultiByTrans("", listSql);
         }
     }
     #endregion
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:53,代码来源:BusinessPrint.cs

示例13: UpdateLastTime

 /// <summary>
 /// 更新最后同步时间
 /// </summary>
 /// <param name="name">名称</param>
 /// <returns></returns>
 public void UpdateLastTime(string name)
 {
     List<SysSQLString> listSql=new List<SysSQLString> ();
     SysSQLString sqlUpdate=new SysSQLString ();
     sqlUpdate.cmdType=CommandType.Text;
     sqlUpdate.Param=new Dictionary<string,string> ();
     string lastTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
     sqlUpdate.sqlString = string.Format("update sys_config set key_value='{0}',update_time='{1}' where key_name='{2}'", lastTime, Common.LocalDateTimeToUtcLong(GlobalStaticObj_Server.Instance.CurrentDateTime).ToString(), name);
     listSql.Add(sqlUpdate);
     try
     {
         DBHelper.BatchExeSQLStrMultiByTransNoLogNoBackup("更新最后同步时间", GlobalStaticObj_Server.CommAccCode, listSql);
     }
     catch (Exception e)
     {
         GlobalStaticObj_Server.YTInterfaceLogService.WriteLog("更新最后同步时间", e);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:23,代码来源:SysConfig.cs

示例14: GetSql

 internal List<SysSQLString> GetSql(string statusName, DataSources.EnumImportStaus importStaus)
 {
     string strImportStatus = ((int)importStaus).ToString();
     List<SysSQLString> listSql = new List<SysSQLString>();
     if (dicIDs.Count == 0)
     {
         return listSql;
     }
     foreach (string key in dicIDs.Keys)
     {
         SysSQLString sql = new SysSQLString();
         sql.cmdType = CommandType.Text;
         sql.Param = new Dictionary<string, string>();
         switch (dicIDs[key].ToString())
         {
             case "销售开单":
                 sql.sqlString = string.Format("update tb_parts_sale_billing set {0}='{1}' where sale_billing_id='{2}';", statusName, strImportStatus, key);
                 break;
             case "维修结算单":
                 sql.sqlString = string.Format("update tb_maintain_settlement_info set {0}='{1}' where settlement_id='{2}';", statusName, strImportStatus, key);
                 break;
             case "三包结算单":
                 sql.sqlString = string.Format("update tb_maintain_three_guaranty_settlement set {0}='{1}' where st_id='{2}';", statusName, strImportStatus, key);
                 break;
             case "销售订单":
                 sql.sqlString = string.Format("update tb_parts_sale_order set {0}='{1}' where sale_order_id='{2}';", statusName, strImportStatus, key);
                 break;
             case "采购开单":
                 sql.sqlString = string.Format("update tb_parts_purchase_billing set {0}='{1}' where purchase_billing_id='{2}';", statusName, strImportStatus, key);
                 break;
             case "采购订单":
                 sql.sqlString = string.Format("update tb_parts_purchase_order set {0}='{1}' where order_id='{2}';", statusName, strImportStatus, key);
                 break;
         }
         listSql.Add(sql);
     }
     return listSql;
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:38,代码来源:Preposition.cs

示例15: DocumentSettlementByVerification

        /// <summary>
        /// 计算往来核销单据已结算金额
        /// </summary>
        /// <param name="enumAccount">往来核销单据类型</param>
        /// <param name="id">往来核销ID</param>
        /// <param name="list">sql列表</param>
        public static void DocumentSettlementByVerification(DataSources.EnumAccountVerification enumAccount, string id, List<SysSQLString> list)
        {
            //不为预收转预收,预付转预付的情况,计算已结算金额
            if (enumAccount != DataSources.EnumAccountVerification.YuShouToYuShou && enumAccount != DataSources.EnumAccountVerification.YuFuToYuFu)
            {
                SysSQLString sqlSettlement = new SysSQLString();
                sqlSettlement.cmdType = CommandType.StoredProcedure;
                sqlSettlement.Param = new Dictionary<string, string>();
                sqlSettlement.Param.Add("order_id", id);
                sqlSettlement.Param.Add("type", "2");

                //预收冲应收,应收转应收
                if (enumAccount == DataSources.EnumAccountVerification.YuShouToYingShou || enumAccount == DataSources.EnumAccountVerification.YingShouToYingShou)
                {
                    sqlSettlement.sqlString = "p_yingshou_jiesuan";
                }
                //预付冲应付,应付转应付
                else if (enumAccount == DataSources.EnumAccountVerification.YuFuToYingFu || enumAccount == DataSources.EnumAccountVerification.YingFuToYingFu)
                {
                    sqlSettlement.sqlString = "p_yingfu_jiesuan";
                }
                //应收冲应付,应付冲应收
                if (enumAccount == DataSources.EnumAccountVerification.YingShouToYingFu || enumAccount == DataSources.EnumAccountVerification.YingFuToYingShou)
                {
                    //应收已结算金额
                    sqlSettlement.sqlString = "p_yingshou_jiesuan";
                    //应付已结算金额
                    SysSQLString sqlSettlement1 = new SysSQLString();
                    sqlSettlement1.cmdType = CommandType.StoredProcedure;
                    sqlSettlement1.Param = new Dictionary<string, string>();
                    sqlSettlement1.Param.Add("order_id", id);
                    sqlSettlement1.Param.Add("type", "2");
                    sqlSettlement1.sqlString = "p_yingfu_jiesuan";
                    list.Add(sqlSettlement1);
                }
                list.Add(sqlSettlement);
            }
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:44,代码来源:Financial.cs


注:本文中的SYSModel.SysSQLString类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。