• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SYSModel.DataSources类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: UCReceivableAdd

 bool isAutoClose = false;//是否自动关闭
 #endregion
 public UCReceivableAdd(WindowStatus status, string orderId, UCReceivableManage uc, DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.dgvBalanceDocuments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right | AnchorStyles.Bottom)));
     this.windowStatus = status;
     this.orderID = orderId;
     this.uc = uc;
     this.orderType = orderType;
     this.orderTypeName = DataSources.GetDescription(orderType, true);
     colBillingMoney.ValueType = typeof(decimal);
     colSettledMoney.ValueType = typeof(decimal);
     colSettlementMoney.ValueType = typeof(decimal);
     colWaitSettledMoney.ValueType = typeof(decimal);
     colPaidMoney.ValueType = typeof(decimal);
     //colDepositRate.ValueType = typeof(decimal);
     //colDeduction.ValueType = typeof(decimal);
     colMoney.ValueType = typeof(decimal);
     dgvBalanceDocuments.RowHeadersVisible = true;
     dgvPaymentDetail.RowHeadersVisible = true;
     base.SaveEvent += new ClickHandler(UCReceivableAdd_SaveEvent);
     base.ImportEvent += new ClickHandler(UCReceivableAdd_ImportEvent);
     base.SubmitEvent += new ClickHandler(UCReceivableAdd_SubmitEvent);
     base.CancelEvent += new ClickHandler(UCReceivableAdd_CancelEvent);
     base.VerifyEvent += new ClickHandler(UCReceivableAdd_VerifyEvent);
     base.InvalidOrActivationEvent += new ClickHandler(UCReceivableAdd_InvalidOrActivationEvent);
     base.CopyEvent += new ClickHandler(UCReceivableAdd_CopyEvent);
     base.EditEvent += new ClickHandler(UCReceivableAdd_EditEvent);
     base.DeleteEvent += new ClickHandler(UCReceivableAdd_DeleteEvent);
     DataGridViewEx.SetDataGridViewStyle(dgvPaymentDetail, colRemark);
     DataGridViewEx.SetDataGridViewStyle(dgvBalanceDocuments, colDocumentRemark);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:34,代码来源:UCReceivableAdd.cs


示例2: DeleteFactory

 /// <summary>
 /// 删除缓存
 /// </summary>
 /// <param name="billNumber">单据号</param>
 /// <param name="billType">单据类型</param>
 /// <param name="operate">操作类型</param>
 public static void DeleteFactory(string billNumber, DataSources.EnumBillType billType, DataSources.EnumOperateObj operate)
 {
     string sql = "delete tb_factory_temp where [email protected] and [email protected] and [email protected]";
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic.Add("billNumber", billNumber);
     dic.Add("billType", billType.ToString());
     dic.Add("opType", operate.ToString("d"));
     DBHelper.ExtNonQuery("删除云平台缓存", GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, sql, System.Data.CommandType.Text, dic);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:15,代码来源:FactoryTemp.cs


示例3: UCReceivableManage

 BusinessPrint businessPrint;//业务打印功能
 #endregion
 public UCReceivableManage(DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     //工具栏事件
     this.AddEvent += new ClickHandler(UCReceivableManage_AddEvent);
     this.EditEvent += new ClickHandler(UCReceivableManage_EditEvent);
     this.CopyEvent += new ClickHandler(UCReceivableManage_CopyEvent);
     this.DeleteEvent += new ClickHandler(UCReceivableManage_DeleteEvent);
     this.ViewEvent += new ClickHandler(UCReceivableManage_ViewEvent);
     this.VerifyEvent += new ClickHandler(UCReceivableManage_VerifyEvent);
     this.SubmitEvent += new ClickHandler(UCReceivableManage_SubmitEvent);
     this.PrintEvent += new ClickHandler(UCReceivableManage_PrintEvent);
     this.ExportEvent += new ClickHandler(UCReceivableManage_ExportEvent);
     base.SetEvent += new ClickHandler(UCReceivableManage_SetEvent);
     this.orderType = orderType;//单据类型
     DataGridViewEx.SetDataGridViewStyle(dgvBillReceivable, colOrderStatus);
     dgvBillReceivable.ReadOnly = false;
     dgvBillReceivable.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(dgvBillReceivable_HeadCheckChanged);
     foreach (DataGridViewColumn dgvc in dgvBillReceivable.Columns)
     {
         if (dgvc.Name == colCheck.Name)
         {
             continue;
         }
         dgvc.ReadOnly = true;
     }
     SetLable();
     #region 打印预览
     string printObject = "tb_receivable";
     string printTitle = "财务收款单";
     if (orderType == DataSources.EnumOrderType.PAYMENT)
     {
         printObject = "tb_payment";
         printTitle = "财务付款单";
     }
     List<string> listNotPrint = new List<string>();
     listNotPrint.Add(colOrgId.Name);
     listNotPrint.Add(colHandle.Name);
     PaperSize paperSize = new PaperSize();
     paperSize.Width = 297;
     paperSize.Height = 210;
     businessPrint = new BusinessPrint(dgvBillReceivable, printObject, printTitle, paperSize, listNotPrint);
     #endregion
     //速查
     SetQuick();
     colDealingsBalance.ValueType = typeof(decimal);
     //负数格式化红色
     ControlsConfig.NegativeFormatting(dgvBillReceivable);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:51,代码来源:UCReceivableManage.cs


示例4: 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


示例5: UCReceivableAdd

 public UCReceivableAdd(WindowStatus status, string orderId, UCReceivableManage uc, DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.dgvBalanceDocuments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right | AnchorStyles.Bottom)));
     this.windowStatus = status;
     this.orderID = orderId;//单据ID
     this.uc = uc;//默认页面
     this.orderType = orderType;//单据类型
     this.orderTypeName = DataSources.GetDescription(orderType, true);
     //设置单元格类型
     colBillingMoney.ValueType = typeof(decimal);
     colSettledMoney.ValueType = typeof(decimal);
     colSettlementMoney.ValueType = typeof(decimal);
     colWaitSettledMoney.ValueType = typeof(decimal);
     colPaidMoney.ValueType = typeof(decimal);
     //colDepositRate.ValueType = typeof(decimal);
     //colDeduction.ValueType = typeof(decimal);
     colMoney.ValueType = typeof(decimal);
     dgvBalanceDocuments.RowHeadersVisible = true;
     dgvPaymentDetail.RowHeadersVisible = true;
     //工具栏事件
     base.SaveEvent += new ClickHandler(UCReceivableAdd_SaveEvent);
     base.ImportEvent += new ClickHandler(UCReceivableAdd_ImportEvent);
     base.SubmitEvent += new ClickHandler(UCReceivableAdd_SubmitEvent);
     base.CancelEvent += new ClickHandler(UCReceivableAdd_CancelEvent);
     base.VerifyEvent += new ClickHandler(UCReceivableAdd_VerifyEvent);
     base.InvalidOrActivationEvent += new ClickHandler(UCReceivableAdd_InvalidOrActivationEvent);
     base.CopyEvent += new ClickHandler(UCReceivableAdd_CopyEvent);
     base.EditEvent += new ClickHandler(UCReceivableAdd_EditEvent);
     base.DeleteEvent += new ClickHandler(UCReceivableAdd_DeleteEvent);
     base.ViewEvent += new ClickHandler(UCReceivableAdd_ViewEvent);
     base.PrintEvent += new ClickHandler(UCReceivableAdd_PrintEvent);
     base.SetEvent += new ClickHandler(UCReceivableAdd_SetEvent);
     //
     DataGridViewEx.SetDataGridViewStyle(dgvPaymentDetail, colRemark);
     DataGridViewEx.SetDataGridViewStyle(dgvBalanceDocuments, colDocumentRemark);
     txtBankAccount.InnerTextBox.TextChanged += new EventHandler(txtBankAccount_ValueChanged);
     //打印预览
     detailPrint = new BusinessDetailPrint(Title);
     //快速设置
     SetQuick();
     //负数格式化红色
     ControlsConfig.NegativeFormatting(dgvBalanceDocuments);
     ControlsConfig.NegativeFormatting(dgvPaymentDetail);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:46,代码来源:UCReceivableAdd.cs


示例6: SubmitAndVerify

        /// <summary>
        /// 提交功能,提交时添加单号
        /// </summary>
        /// <param name="strMessage">提示信息</param>
        /// <param name="status">单据状态</param>
        private void SubmitAndVerify(string strMessage, DataSources.EnumAuditStatus status)
        {
            if (MessageBoxEx.Show("确认要提交吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
            {
                return;
            }
            List<SQLObj> listSql = new List<SQLObj>();
            string strReceId = string.Empty;//单据Id值           
            foreach (DataGridViewRow dr in dgvRData.Rows)
            {
                object isCheck = dr.Cells["colCheck"].EditedFormattedValue;
                if (isCheck != null && (bool)isCheck)
                {
                    strReceId += dr.Cells["oldpart_id"].Value.ToString() + ",";
                    SQLObj obj = new SQLObj();
                    obj.cmdType = CommandType.Text;
                    Dictionary<string, ParamObj> dicParam = new Dictionary<string, ParamObj>();
                    dicParam.Add("receipts_no", new ParamObj("receipts_no", CommonUtility.GetNewNo(SYSModel.DataSources.EnumProjectType.PartsSend), SysDbType.VarChar, 40));//单据编号                   
                    dicParam.Add("oldpart_id", new ParamObj("oldpart_id", dr.Cells["oldpart_id"].Value, SysDbType.VarChar, 40));//单据ID
                    dicParam.Add("info_status", new ParamObj("info_status", status, SysDbType.VarChar, 40));//单据状态
                    dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));//修改人Id
                    dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));//修改人姓名
                    dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt));//修改时间               
                    obj.sqlString = "update tb_maintain_oldpart_receiv_send set [email protected]_status,[email protected]_no,[email protected]_by,[email protected]_name,[email protected]_time where [email protected]_id";
                    obj.Param = dicParam;
                    listSql.Add(obj);
                }
            }

            if (string.IsNullOrEmpty(strReceId))
            {
                MessageBoxEx.Show("请选择需要" + strMessage + "的记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (DBHelper.BatchExeSQLMultiByTrans("更新单据状态为提交", listSql))
            {
                MessageBoxEx.Show("" + strMessage + "成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                BindPageData();
            }
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:45,代码来源:UCOldPartsSendManager.cs


示例7: UCReceivableManage

 BusinessPrint businessPrint;//业务打印功能
 #endregion
 public UCReceivableManage(DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.AddEvent += new ClickHandler(UCReceivableManage_AddEvent);
     this.EditEvent += new ClickHandler(UCReceivableManage_EditEvent);
     this.CopyEvent += new ClickHandler(UCReceivableManage_CopyEvent);
     this.DeleteEvent += new ClickHandler(UCReceivableManage_DeleteEvent);
     this.ViewEvent += new ClickHandler(UCReceivableManage_ViewEvent);
     this.VerifyEvent += new ClickHandler(UCReceivableManage_VerifyEvent);
     this.SubmitEvent += new ClickHandler(UCReceivableManage_SubmitEvent);
     this.PrintEvent += new ClickHandler(UCReceivableManage_PrintEvent);
     this.ExportEvent += new ClickHandler(UCReceivableManage_ExportEvent);
     this.orderType = orderType;
     DataGridViewEx.SetDataGridViewStyle(dgvBillReceivable, colOrderStatus);
     dgvBillReceivable.ReadOnly = false;
     dgvBillReceivable.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(dgvBillReceivable_HeadCheckChanged);
     foreach (DataGridViewColumn dgvc in dgvBillReceivable.Columns)
     {
         if (dgvc.Name == colCheck.Name)
         {
             continue;
         }
         dgvc.ReadOnly = true;
     }
     SetLable();
     string printObject = "tb_receivable";
     string printTitle = "财务收款单";
     if (orderType == DataSources.EnumOrderType.PAYMENT)
     {
         printObject = "tb_payment";
         printTitle = "财务付款单";
     }
     List<string> listNotPrint = new List<string>();
     listNotPrint.Add(colOrgId.Name);
     listNotPrint.Add(colHandle.Name);
     PaperSize paperSize = new PaperSize();
     paperSize.Width = 297;
     paperSize.Height = 210;
     businessPrint = new BusinessPrint(dgvBillReceivable, printObject, printTitle, paperSize, listNotPrint);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:42,代码来源:UCReceivableManage.cs


示例8: UCReceivableManage

 public UCReceivableManage(DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.AddEvent += new ClickHandler(UCReceivableManage_AddEvent);
     this.EditEvent += new ClickHandler(UCReceivableManage_EditEvent);
     this.CopyEvent += new ClickHandler(UCReceivableManage_CopyEvent);
     this.DeleteEvent += new ClickHandler(UCReceivableManage_DeleteEvent);
     this.ViewEvent += new ClickHandler(UCReceivableManage_ViewEvent);
     this.VerifyEvent += new ClickHandler(UCReceivableManage_VerifyEvent);
     this.SubmitEvent += new ClickHandler(UCReceivableManage_SubmitEvent);
     this.orderType = orderType;
     dgvBillReceivable.ReadOnly = false;
     dgvBillReceivable.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(dgvBillReceivable_HeadCheckChanged);
     foreach (DataGridViewColumn dgvc in dgvBillReceivable.Columns)
     {
         if (dgvc.Name == colCheck.Name)
         {
             continue;
         }
         dgvc.ReadOnly = true;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:22,代码来源:UCReceivableManage.cs


示例9: 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


示例10: 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


示例11: GetAdvance

 /// <summary>
 /// 获取预收/付余额
 /// </summary>
 /// <param name="custID">往来单位单位ID</param>
 /// <param name="orderType">单据类型</param>
 /// <returns></returns>
 public static decimal GetAdvance(string custID, DataSources.EnumOrderType orderType)
 {
     SYSModel.SQLObj sql = new SYSModel.SQLObj();
     sql.cmdType = CommandType.StoredProcedure;
     if (orderType == DataSources.EnumOrderType.PAYMENT)
     {
         sql.sqlString = "p_yufu_yu_e";
     }
     else
     {
         sql.sqlString = "p_yushou_yu_e";
     }
     sql.Param = new Dictionary<string, ParamObj>();
     sql.Param.Add("cust_id", new ParamObj("cust_id", custID, SysDbType.VarChar, 40));
     DataSet ds = DBHelper.GetDataSet("查询往来余额", sql);
     if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0 || ds.Tables[0].Rows[0][0] == DBNull.Value)
     {
         return 0;
     }
     else
     {
         return Convert.ToDecimal(ds.Tables[0].Rows[0][0]);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:30,代码来源:DBOperation.cs


示例12: AlterOrdersStatus

 /// <summary>
 ///分配工时时修改单据与项目的状态
 /// </summary>
 /// <param name="DStatus">单据状态</param>
 /// <param name="PStatus">项目状态</param>       
 private void AlterOrdersStatus(DataSources.EnumDispatchStatus DStatus, DataSources.EnumProjectDisStatus PStatus)
 {
     try
     {
         labStatusS.Text = labStatusS.Text = DataSources.GetDescription(typeof(DataSources.EnumDispatchStatus), int.Parse(CommonCtrl.IsNullToString(Convert.ToInt32(DStatus).ToString())));//单据状态
         foreach (DataGridViewRow dr in dgvproject.Rows)
         {
             //    object isCheck = dr.Cells["colCheck"].EditedFormattedValue;
             string strPname = CommonCtrl.IsNullToString(dr.Cells["item_name"].Value);
             if (strPname.Length > 0)
             {
                 //if (PStatus == DataSources.EnumProjectDisStatus.NotStartWork)
                 //{
                 //if (isCheck != null && (bool)isCheck)
                 //{
                 dr.Cells["repair_progress"].Value = DataSources.GetDescription(typeof(DataSources.EnumProjectDisStatus), int.Parse(CommonCtrl.IsNullToString(Convert.ToInt32(PStatus).ToString())));//项目状态 
                 //}
                 //}
                 if (!string.IsNullOrEmpty(strStarTime))
                 {
                     dr.Cells["start_work_time"].Value = strStarTime;
                 }
                 if (!string.IsNullOrEmpty(strStopTime))
                 {
                     dr.Cells["shut_down_time"].Value = strStopTime;
                 }
                 if (!string.IsNullOrEmpty(strCTime))
                 {
                     dr.Cells["complete_work_time"].Value = strCTime;
                 }
                 if (!string.IsNullOrEmpty(strStopReason))
                 {
                     dr.Cells["shut_down_reason"].Value = strStopReason;
                 }
                 if (!string.IsNullOrEmpty(strContinueTime) && !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dr.Cells["shut_down_time"].Value)))
                 {
                     dr.Cells["continue_time"].Value = strContinueTime;
                     TimeSpan nd = Convert.ToDateTime(strContinueTime) - Convert.ToDateTime(dr.Cells["shut_down_time"].Value.ToString());
                     dr.Cells["shut_down_duration"].Value = nd.TotalMinutes.ToString();
                 }
                 //}
             }
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:54,代码来源:UCDispatchDetails.cs


示例13: SaveProjectData

        private void SaveProjectData(List<SQLObj> listSql, string partID, DataSources.EnumProjectDisStatus PStatus)
        {
            try
            {
                foreach (DataGridViewRow dgvr in dgvproject.Rows)
                {
                    string strPname = CommonCtrl.IsNullToString(dgvr.Cells["item_name"].Value);
                    if (strPname.Length > 0)
                    {
                        SQLObj obj = new SQLObj();
                        obj.cmdType = CommandType.Text;
                        Dictionary<string, ParamObj> dicParam = new Dictionary<string, ParamObj>();
                        dicParam.Add("maintain_id", new ParamObj("maintain_id", partID, SysDbType.VarChar, 40));
                        dicParam.Add("item_no", new ParamObj("item_no", dgvr.Cells["item_no"].Value, SysDbType.VarChar, 40));//项目编码
                        dicParam.Add("item_type", new ParamObj("item_type", dgvr.Cells["item_type"].Value, SysDbType.VarChar, 40));//项目维修类别
                        dicParam.Add("item_name", new ParamObj("item_name", dgvr.Cells["item_name"].Value, SysDbType.VarChar, 40));//项目名称
                        dicParam.Add("man_hour_type", new ParamObj("man_hour_type", dgvr.Cells["man_hour_type"].Value, SysDbType.VarChar, 40));//工时类别
                        string strHourQuantity = CommonCtrl.IsNullToString(dgvr.Cells["man_hour_quantity"].Value);//工时数量
                        if (!string.IsNullOrEmpty(strHourQuantity))//工时单价
                        {
                            dicParam.Add("man_hour_quantity", new ParamObj("man_hour_quantity", strHourQuantity, SysDbType.Decimal, 15));
                        }
                        else
                        {
                            dicParam.Add("man_hour_quantity", new ParamObj("man_hour_quantity", null, SysDbType.Decimal, 15));
                        }
                        //会员工时价
                        dicParam.Add("man_hour_norm_unitprice", new ParamObj("man_hour_norm_unitprice", dgvr.Cells["man_hour_norm_unitprice"].Value, SysDbType.Decimal, 15));
                        dicParam.Add("member_discount", new ParamObj("member_discount", dgvr.Cells["member_discount"].Value, SysDbType.Decimal, 5));//会员折扣                   
                        dicParam.Add("member_price", new ParamObj("member_price", dgvr.Cells["member_price"].Value, SysDbType.Decimal, 15));//会员工时费
                        dicParam.Add("member_sum_money", new ParamObj("member_sum_money", dgvr.Cells["member_sum_money"].Value, SysDbType.Decimal, 15));//折扣额
                        dicParam.Add("sum_money_goods", new ParamObj("sum_money_goods", dgvr.Cells["sum_money_goods"].Value, SysDbType.Decimal, 15));//货款
                        dicParam.Add("repair_progress", new ParamObj("repair_progress", Convert.ToInt32(PStatus), SysDbType.VarChar, 40));//维修进度

                        string strIsThree = CommonCtrl.IsNullToString(dgvr.Cells["three_warranty"].Value);
                        if (!string.IsNullOrEmpty(strIsThree))
                        {
                            dicParam.Add("three_warranty", new ParamObj("three_warranty", strIsThree == "是" ? "1" : "0", SysDbType.VarChar, 2));
                        }
                        else
                        {
                            dicParam.Add("three_warranty", new ParamObj("three_warranty", null, SysDbType.VarChar, 2));
                        }
                        //开工时间
                        dicParam.Add("start_work_time", new ParamObj("start_work_time", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["start_work_time"].Value)) ? Common.LocalDateTimeToUtcLong(Convert.ToDateTime(dgvr.Cells["start_work_time"].Value)).ToString() : null, SysDbType.BigInt));
                        //完工时间
                        dicParam.Add("complete_work_time", new ParamObj("complete_work_time", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["complete_work_time"].Value)) ? Common.LocalDateTimeToUtcLong(Convert.ToDateTime(dgvr.Cells["complete_work_time"].Value)).ToString() : null, SysDbType.BigInt));
                        //停工时间
                        dicParam.Add("shut_down_time", new ParamObj("shut_down_time", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["shut_down_time"].Value)) ? Common.LocalDateTimeToUtcLong(Convert.ToDateTime(dgvr.Cells["shut_down_time"].Value)).ToString() : null, SysDbType.BigInt));
                        //停工原因
                        dicParam.Add("shut_down_reason", new ParamObj("shut_down_reason", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["shut_down_reason"].Value)) ? dgvr.Cells["shut_down_reason"].Value.ToString() : null, SysDbType.VarChar, 200));
                        //停工累计时
                        dicParam.Add("shut_down_duration", new ParamObj("shut_down_duration", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["shut_down_duration"].Value)) ? dgvr.Cells["shut_down_duration"].Value.ToString() : null, SysDbType.Decimal, 15));
                        //继续开工时间
                        dicParam.Add("continue_time", new ParamObj("continue_time", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["continue_time"].Value)) ? Common.LocalDateTimeToUtcLong(Convert.ToDateTime(dgvr.Cells["continue_time"].Value)).ToString() : null, SysDbType.BigInt));
                        dicParam.Add("remarks", new ParamObj("remarks", dgvr.Cells["remarks"].Value, SysDbType.VarChar, 200));
                        dicParam.Add("enable_flag", new ParamObj("enable_flag", "1", SysDbType.VarChar, 1));
                        dicParam.Add("whours_id", new ParamObj("whours_id", dgvr.Cells["whours_id"].Value, SysDbType.VarChar, 40));
                        dicParam.Add("data_source", new ParamObj("data_source", dgvr.Cells["data_source"].Value, SysDbType.VarChar, 5));                        
                        string strPID = CommonCtrl.IsNullToString(dgvr.Cells["item_id"].Value);
                        if (strPID == "NewId")
                        {
                            opName = "新增调度维修项目";
                            strPID = Guid.NewGuid().ToString();
                            dicParam.Add("item_id", new ParamObj("item_id", strPID, SysDbType.VarChar, 40));
                            obj.sqlString = @"insert into [tb_maintain_item] (item_id,maintain_id,item_no,item_type,item_name,man_hour_type,man_hour_quantity,man_hour_norm_unitprice,member_discount,member_price,member_sum_money,sum_money_goods
                        ,repair_progress,three_warranty,start_work_time,complete_work_time,shut_down_time,shut_down_reason,shut_down_duration,continue_time,remarks,enable_flag,whours_id,data_source)
                        values (@item_id,@maintain_id,@item_no,@item_type,@item_name,@man_hour_type,@man_hour_quantity,@man_hour_norm_unitprice,@member_discount,@member_price,@member_sum_money,@sum_money_goods
                        ,@repair_progress,@three_warranty,@start_work_time,@complete_work_time,@shut_down_time,@shut_down_reason,@shut_down_duration,@continue_time,@remarks,@enable_flag,@whours_id,@data_source);";
                        }
                        else
                        {
                            dicParam.Add("item_id", new ParamObj("item_id", dgvr.Cells["item_id"].Value, SysDbType.VarChar, 40));
                            opName = "更新调度维修项目";
                            obj.sqlString = @"update tb_maintain_item set [email protected]_no,[email protected]_type,[email protected]_name,[email protected]_hour_type,[email protected]_hour_quantity,[email protected]_hour_norm_unitprice,[email protected]_discount,[email protected]_price,
                        [email protected]_sum_money,[email protected]_money_goods,[email protected]_progress,[email protected]_warranty,[email protected]_work_time,[email protected]_work_time,[email protected]_down_time
                        ,[email protected]_down_reason,[email protected]_down_duration,[email protected]_time,[email protected],[email protected]_flag,[email protected]_id,[email protected]_source where [email protected]_id";
                        }
                        obj.Param = dicParam;
                        listSql.Add(obj);
                    }
                }
            }
            catch (Exception ex)
            {
                HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
            }
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:88,代码来源:UCDispatchDetails.cs


示例14: UpdateRepairOrderInfo

 /// <summary>
 /// 更新维修单基本信息
 /// </summary>
 /// <param name="listSql">SQLObj list</param>
 /// <param name="DStatus">调度状态枚举</param>
 private void UpdateRepairOrderInfo(List<SQLObj> listSql, DataSources.EnumDispatchStatus DStatus)
 {
     try
     {
         SQLObj obj = new SQLObj();
         obj.cmdType = CommandType.Text;
         Dictionary<string, ParamObj> dicParam = new Dictionary<string, ParamObj>();
         dicParam.Add("dispatch_status", new ParamObj("dispatch_status", Convert.ToInt32(DStatus).ToString(), SysDbType.VarChar, 1));//调度状态
         if (DStatus == DataSources.EnumDispatchStatus.FinishWork)
         {
             dicParam.Add("complete_work_time", new ParamObj("complete_work_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt));//完工时间               
         }
         else
         {
             dicParam.Add("complete_work_time", new ParamObj("complete_work_time", null, SysDbType.BigInt));//完工时间               
         }
         dicParam.Add("set_meal", new ParamObj("set_meal", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(cobSetMeal.SelectedValue)) ? cobSetMeal.SelectedValue.ToString() : null, SysDbType.VarChar, 40));//维修套餐
         dicParam.Add("driver_name", new ParamObj("driver_name", txtDriver.Caption.Trim(), SysDbType.VarChar, 20));//报修人
         if (!string.IsNullOrEmpty(txtDriverPhone.Caption.Trim()))//报修人手机
         {
             dicParam.Add("driver_mobile", new ParamObj("driver_mobile", txtDriverPhone.Caption.Trim(), SysDbType.VarChar, 15));//报修人手机
         }
         else
         {
             dicParam.Add("driver_mobile", new ParamObj("driver_mobile", null, SysDbType.VarChar, 15));//报修人手机
         }
         dicParam.Add("travel_mileage", new ParamObj("travel_mileage", !string.IsNullOrEmpty(txtMil.Caption.Trim()) ? txtMil.Caption.Trim() : null, SysDbType.Decimal, 15));//行驶里程
         dicParam.Add("fault_describe", new ParamObj("fault_describe", txtDesc.Caption.Trim(), SysDbType.VarChar, 200));//故障描述
         dicParam.Add("maintain_id", new ParamObj("maintain_id", strReceiveId, SysDbType.VarChar, 40));//Id
         dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));//修改人Id
         dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));//修改人姓名
         dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt));//修改时间               
         if (!string.IsNullOrEmpty(strInspection))
         {
             dicParam.Add("Verify_advice", new ParamObj("Verify_advice", strInspection, SysDbType.VarChar, 200));//质检意见 
             obj.sqlString = @"update tb_maintain_info set [email protected]_status,[email protected]_meal
            ,[email protected]_name,[email protected]_mobile,[email protected]_mileage,[email protected]_describe
            ,[email protected]_by,[email protected]_name,[email protected]_time,[email protected]_advice,[email protected]_work_time
            where [email protected]_id";
         }
         else
         {
             obj.sqlString = @"update tb_maintain_info set [email protected]_status,[email protected]_work_time,[email protected]_meal
             ,[email protected]_name,[email protected]_mobile,[email protected]_mileage,[email protected]_describe
             ,[email protected]_by,[email protected]_name,[email protected]_time
             where [email protected]_id";
         }
         obj.Param = dicParam;
         listSql.Add(obj);
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:60,代码来源:UCDispatchDetails.cs


示例15: UpdateRepairOrderInfo

 /// <summary>
 /// 更新维修单基本信息
 /// </summary>
 /// <param name="listSql">SQLObj list</param>
 /// <param name="DStatus">调度状态枚举</param>
 private void UpdateRepairOrderInfo(List<SQLObj> listSql, DataSources.EnumDispatchStatus DStatus)
 {
     SQLObj obj = new SQLObj();
     obj.cmdType = CommandType.Text;
     Dictionary<string, ParamObj> dicParam = new Dictionary<string, ParamObj>();
     dicParam.Add("dispatch_status", new ParamObj("dispatch_status", Convert.ToInt32(DStatus).ToString(), SysDbType.VarChar, 1));//调度状态
     if (DStatus == DataSources.EnumDispatchStatus.FinishWork)
     {
         dicParam.Add("complete_work_time", new ParamObj("complete_work_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt));//完工时间               
     }
     else
     {
         dicParam.Add("complete_work_time", new ParamObj("complete_work_time",null, SysDbType.BigInt));//完工时间               
     }
     dicParam.Add("set_meal", new ParamObj("set_meal", !string.IsNullOrEmpty(CommonCtrl.IsNullToString(cobSetMeal.SelectedValue)) ? cobSetMeal.SelectedValue.ToString() : null, SysDbType.VarChar, 40));//维修套餐
     dicParam.Add("maintain_id", new ParamObj("maintain_id", strReceiveId, SysDbType.VarChar, 40));//Id
     dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));//修改人Id
     dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));//修改人姓名
     dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt));//修改时间               
     if (!string.IsNullOrEmpty(strInspection))
     {
         dicParam.Add("Verify_advice", new ParamObj("Verify_advice", strInspection, SysDbType.VarChar, 200));//质检意见 
         obj.sqlString = @"update tb_maintain_info set [email protected]_status,[email protected]_meal,[email protected]_by,[email protected]_name,[email protected]_time,[email protected]_advice
     where [email protected]_id";
     }
     else
     {
         obj.sqlString = @"update tb_maintain_info set [email protected]_status,[email protected]_work_time,[email protected]_meal,[email protected]_by,[email protected]_name,[email protected]_time
     where [email protected]_id";
     }
     obj.Param = dicParam;
     listSql.Add(obj);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:38,代码来源:UCDispatchDetails.cs


示例16: SaveAndSubmit

        private void SaveAndSubmit(string strMessage, DataSources.EnumAuditStatus status)
        {
            try
            {
                List<SQLObj> listSql = new List<SQLObj>();
                string currCom_id = string.Empty;//当前信息编号
                string keyName = string.Empty;
                string keyValue = string.Empty;
                #region 必要的判断
                if (string.IsNullOrEmpty(txtCarNO.Text.Trim()))
                {
                    MessageBoxEx.Show("车牌号不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                    return;
                }
                if (string.IsNullOrEmpty(txtCustomNO.Text.Trim()))
                {
                    MessageBoxEx.Show("客户编码不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                    return;
                }
                if (string.IsNullOrEmpty(txtCustomName.Caption.Trim()))
                {
                    MessageBoxEx.Show("客户名称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                    return;
                }
                if (string.IsNullOrEmpty(txtDriver.Caption.Trim()))
                {
                    MessageBoxEx.Show("报修人不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                    return;
                }
                if (!string.IsNullOrEmpty(txtDriverPhone.Caption.Trim()))//报修人手机
                {
                    if (!Validator.IsMobile(txtDriverPhon 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SYSModel.SQLObj类代码示例发布时间:2022-05-26
下一篇:
C# SVM.Problem类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap