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


C# Chooser.frmParts类代码示例

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


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

示例1: txtparts_name_ChooserClick

 /// <summary> 选择配件名称
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtparts_name_ChooserClick(object sender, EventArgs e)
 {
     frmParts chooseParts = new frmParts();
     chooseParts.ShowDialog();
     if (!string.IsNullOrEmpty(chooseParts.PartsID))
     {
         txtparts_name.Text = chooseParts.PartsName;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:13,代码来源:UCChoosePurchaseBill.cs

示例2: txtcPartsCode_ChooserClick

 //配件选择器
 private void txtcPartsCode_ChooserClick(object sender, EventArgs e)
 {
     frmParts frmPartsChooser = new frmParts();
     if (frmPartsChooser.ShowDialog() == DialogResult.OK)
     {
         txtcPartsCode.Text = frmPartsChooser.PartsCode;
         txtPartsName.Caption = frmPartsChooser.PartsName;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:10,代码来源:UCWarehouseDetail.cs

示例3: txtcparts_code_ChooserClick

 //配件选择
 private void txtcparts_code_ChooserClick(object sender, EventArgs e)
 {
     frmParts parts = new frmParts();
     if (parts.ShowDialog() == DialogResult.OK)
     {
         txtcparts_code.Text = parts.PartsCode;
         txtPartsName.Caption = parts.PartsName;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:10,代码来源:UCPurchaseBillingSummariz.cs

示例4: txtPartsCode_ChooserClick

 /// <summary>
 /// 配件编码选择器事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtPartsCode_ChooserClick(object sender, EventArgs e)
 {
     frmParts frmPart = new frmParts();
     DialogResult result = frmPart.ShowDialog();
     if (result == DialogResult.OK)
     {
         txtPartsCode.Text = frmPart.PartsCode;
         txtPartsCode.Tag = frmPart.PartsID;
         txtPartsName.Caption = frmPart.PartsName;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:16,代码来源:UCOldPartsInventoryQuery.cs

示例5: addParts_Click

 private void addParts_Click(object sender, EventArgs e)
 {
     frmParts frmPart = new frmParts();
     DialogResult result = frmPart.ShowDialog();
     if (result == DialogResult.OK)
     {
         string strPId = frmPart.PartsID;
         DataTable dpt = DBHelper.GetTable("", "v_parts", "*", " parts_id='" + strPId + "'", "", "");
         if (dpt.Rows.Count > 0)
         {
             DataRow dpr = dpt.Rows[0];
             dgvMaterials.CurrentRow.Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
             dgvMaterials.CurrentRow.Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
             dgvMaterials.CurrentRow.Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["default_unit_name"]);
             dgvMaterials.CurrentRow.Cells["number"].Value = "1";
             dgvMaterials.CurrentRow.Cells["original_price"].Value = CommonCtrl.IsNullToString(dpr["highest_out_price"]);
             dgvMaterials.CurrentRow.Cells["Mremarks"].Value = CommonCtrl.IsNullToString(dpr["remark"]);
             dgvMaterials.Rows.Add(1);
             listMater.Add(CommonCtrl.IsNullToString(dpr["ser_parts_code"]));
         }
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:22,代码来源:UCRepairMealAddOrEdit.cs

示例6: InitControlDataSource


//.........这里部分代码省略.........
                    var chooser = new FormChooserFault();
                    var result = chooser.ShowDialog();
                    if (result != DialogResult.OK) return;

                    txt_fault_system.Text = chooser.SystemName;
                    txt_fault_system.Tag = chooser.SystemCode;
                    txt_fault_assembly.Caption = chooser.AssemblyName;
                    txt_fault_assembly.Tag = chooser.AssemblyCode;
                    txt_fault_part.Caption = chooser.PartmName;
                    txt_fault_part.Tag = chooser.PartCode;
                    //txt_fault_schema.Text = chooser.SchemaName;
                    //txt_fault_schema.Tag = chooser.SchemaCode;

                };
                txt_fault_schema.ChooserClick += delegate  //故障模式选择器
                {
                    var chooser = new FormChooserFaultModel();
                    var result = chooser.ShowDialog();
                    if (result != DialogResult.OK) return;
                    txt_fault_schema.Text = chooser.FmeaName;
                    txt_fault_schema.Tag = chooser.FmeaCode;
                };
                #endregion

                #region 外出信息
                CommonCtrl.BindComboBoxByDictionarr(cbo_whether_yt, "sys_true_false", false);   //是否宇通车
                if(cbo_whether_yt.Items.Contains("0")) cbo_whether_yt.SelectedValue = "0";
                CommonCtrl.BindComboBoxByDictionarr(cbo_means_traffic, "traffic_mode_yt", false);   //外出交通方式
                if (cbo_means_traffic.Items.Count > 0) cbo_means_traffic.SelectedIndex = 0;
                cbo_means_traffic.SelectedIndexChanged += delegate
                {
                    if (CommonCtrl.IsNullToString(cbo_means_traffic.SelectedValue) ==
                        DbDic2Enum.TRAFFIC_MODE_YT_100000000)
                    {
                        txt_journey_subsidy.Enabled = false;
                    }
                    else
                    {
                        txt_journey_subsidy.Enabled = true;
                    }
                };

                UIAssistants.BindingServiceStationUser(cbo_goout_approver, true, "请选择"); //外出批准人选择器
                
                #endregion

                #region 配件信息
                dtp_parts_buy_time.Value = DateTime.Now;
                //txt_parts_buy_corp.ChooserClick += delegate  //配件购买单位(客户选择器)
                //{
                //    var custChooser = new frmChooseCompany();
                //    var result = custChooser.ShowDialog();
                //    if (result == DialogResult.OK)
                //    {
                //        txt_parts_buy_corp.Text = custChooser.Sap_Code;
                //    }
                //};
                CommonCtrl.BindComboBoxByDictionarr(cbo_contain_man_hour_cost, "sys_true_false", false);   //是否包含工时费
                cbo_contain_man_hour_cost.SelectedValue = DbDic2Enum.TRUE;

                txt_parts_code.ChooserClick += delegate  //配件编号(配件选择器)
                {
                    var chooser = new frmParts();
                    var result = chooser.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        txt_parts_code.Text = chooser.CarPartsCode;
                        txt_materiel_describe.Caption = chooser.PartsName;
                    }
                };
                //txt_first_install_station.ChooserClick += delegate  //首次安装服务站(客户选择器)
                //{
                //    var custChooser = new frmChooseCompany();
                //    var result = custChooser.ShowDialog();
                //    if (result == DialogResult.OK)
                //    {
                //        txt_first_install_station.Text = custChooser.Sap_Code;
                //    }
                //};
                CommonCtrl.BindComboBoxByDictionarr(cbo_part_guarantee_period, "parts_warranty_agreement_yt", false);   //协议保养日期
                #endregion

                #region 经办人
                txt_responsible_opid.ChooserClick += delegate   //经办人选择器
                {
                    var chooser = new frmUsers();
                    var result = chooser.ShowDialog();
                    if (result != DialogResult.OK) return;
                    txt_responsible_opid.Text = chooser.User_Name;
                    txt_responsible_opid.Tag = chooser.User_ID;
                    txt_org_name.Caption = chooser.OrgName;
                    txt_org_name.Tag = chooser.OrgId;
                };
                #endregion
            }
            catch (Exception ex)
            {
                //日记记录
            }
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:101,代码来源:UCMaintainThreeGuarantyEdit.cs

示例7: dgvMaterials_CellDoubleClick

        private void dgvMaterials_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                int intMrows = e.RowIndex;//当前行的索引
                frmParts frmPart = new frmParts();
                DialogResult result = frmPart.ShowDialog();
                if (result == DialogResult.OK)
                {
                    string strPId = frmPart.PartsID;
                    DataTable dpt = DBHelper.GetTable("", "v_parts_chooser", "*", " parts_id='" + strPId + "'", "", "");
                    if (dpt.Rows.Count > 0)
                    {
                        DataRow dpr = dpt.Rows[0];
                        if (listMater.Contains(CommonCtrl.IsNullToString(dpr["ser_parts_code"])))
                        {
                            if (MessageBoxEx.Show("已添加此配件,是否继续添加?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
                            {
                                return;
                            }
                        }
                        for (int i = 0; i <= intMrows; i++)
                        {
                            if (string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_code"].Value)))
                            {
                                dgvMaterials.Rows[i].Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
                                dgvMaterials.Rows[i].Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
                                dgvMaterials.Rows[i].Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["unit"]);
                                dgvMaterials.Rows[i].Cells["inventory_num"].Value = CommonCtrl.IsNullToString(dpr["paper_count"]);
                                dgvMaterials.Rows[i].Cells["quantity"].Value = "0.00";
                                //dgvMaterials.Rows[e.RowIndex].Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
                                dgvMaterials.Rows[i].Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
                                dgvMaterials.Rows[i].Cells["vehicle_brand"].Value = CommonCtrl.IsNullToString(dpr["brand_name"]);
                                dgvMaterials.Rows[i].Cells["three_warranty"].Value = "否";
                                dgvMaterials.Rows[i].Cells["warehouse"].Value = "";
                                dgvMaterials.Rows[i].Cells["Mdata_source"].Value = CommonCtrl.IsNullToString(dpr["data_source"]);
                                dgvMaterials.Rows[i].Cells["three_warranty"].ReadOnly = CommonCtrl.IsNullToString(dpr["data_source"]) == Convert.ToInt32(DataSources.EnumDataSources.SELFBUILD).ToString() ? true : false;
                                dgvMaterials.Rows.Add(1);
                                break;
                            }
                        }
                    }
                }
                foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
                {
                    string strPCode = CommonCtrl.IsNullToString(dgvr.Cells["parts_code"].Value);
                    if (!string.IsNullOrEmpty(strPCode)&&!listMater.Contains(strPCode))
                    {
                        listMater.Add(strPCode);
                    }
                }
            }
            catch (Exception ex)
            {
                HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
            }

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

示例8: dgvMaterials_CellDoubleClick

 private void dgvMaterials_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (strProjectSattus != "3" && strProjectSattus != "6")
     {
         frmParts frmPart = new frmParts();
         DialogResult result = frmPart.ShowDialog();
         if (result == DialogResult.OK)
         {
             string strPId = frmPart.PartsID;
             DataTable dpt = DBHelper.GetTable("", "v_parts", "*", " parts_id='" + strPId + "'", "", "");
             if (dpt.Rows.Count > 0)
             {
                 DataRow dpr = dpt.Rows[0];
                 dgvMaterials.Rows[e.RowIndex].Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["norms"].Value = CommonCtrl.IsNullToString(dpr["model"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["default_unit_name"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
                 dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value = "1";
                 dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value = CommonCtrl.IsNullToString(dpr["highest_out_price"]);
                 string strPzk = !string.IsNullOrEmpty(strMemberPZk) ? strMemberPZk : "10";
                 //会员折扣
                 dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value = Convert.ToString(Convert.ToDecimal(strPzk) * 10);
                 string strNum =!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value))?CommonCtrl.IsNullToString(dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value):"0";
                 string strUMoney = !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value)) ? dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value.ToString() : "0";
                 //会员单价
                 dgvMaterials.Rows[e.RowIndex].Cells["Mmember_price"].Value = Convert.ToString(Convert.ToDecimal(strUMoney = strUMoney == "" ? "0" : strUMoney) * Convert.ToDecimal(dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value) / 10);
                 dgvMaterials.Rows[e.RowIndex].Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["Mremarks"].Value = CommonCtrl.IsNullToString(dpr["remark"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["vehicle_brand"].Value = CommonCtrl.IsNullToString(dpr["v_brand_name"]);
                 dgvMaterials.Rows[e.RowIndex].Cells["M_Id"].Value = frmPart.PartsID;
                 dgvMaterials.Rows.Add(1);
             }
         }
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:36,代码来源:UCDispatchDetails.cs

示例9: addParts_Click

 private void addParts_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
     {
         string strPCode = CommonCtrl.IsNullToString(dgvr.Cells["parts_code"].Value);
         if (!string.IsNullOrEmpty(strPCode))
         {
             listMater.Add(strPCode);
         }
     }
     frmParts frmPart = new frmParts();
     DialogResult result = frmPart.ShowDialog();
     if (result == DialogResult.OK)
     {
         string strPId = frmPart.PartsID;
         DataTable dpt = DBHelper.GetTable("", "v_parts", "*", " parts_id='" + strPId + "'", "", "");
         if (dpt.Rows.Count > 0)
         {
             DataRow dpr = dpt.Rows[0];
             if (listMater.Contains(CommonCtrl.IsNullToString(dpr["ser_parts_code"])))
             {
                 MessageBoxEx.Show("此配件已存在,请选择其他配件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 return;
             }
             dgvMaterials.CurrentRow.Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
             dgvMaterials.CurrentRow.Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
             dgvMaterials.CurrentRow.Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["default_unit_name"]);
             dgvMaterials.CurrentRow.Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
             dgvMaterials.CurrentRow.Cells["quantity"].Value = "0";
             dgvMaterials.CurrentRow.Cells["unit_price"].Value = CommonCtrl.IsNullToString(dpr["highest_out_price"]);
             dgvMaterials.CurrentRow.Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
             dgvMaterials.CurrentRow.Cells["vehicle_brand"].Value = CommonCtrl.IsNullToString(dpr["v_brand_name"]);
             dgvMaterials.Rows.Add(1);
         }
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:36,代码来源:UCOldPartsReceiptAddOrEdit.cs

示例10: txtparts_code2_ChooserClick

 /// <summary> 选择配件编码
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtparts_code2_ChooserClick(object sender, EventArgs e)
 {
     frmParts chooseParts = new frmParts();
     chooseParts.ShowDialog();
     this.Refresh();
     if (!string.IsNullOrEmpty(chooseParts.PartsID))
     {
         txtparts_code2.Text = chooseParts.PartsCode;
         txtparts_name2.Caption = chooseParts.PartsName;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:15,代码来源:UCPurchaseBillManangView.cs

示例11: addParts_Click

 private void addParts_Click(object sender, EventArgs e)
 {
     try
     {
         int intMrows = dgvMaterials.CurrentRow.Index;//当前行的索引
         frmParts frmPart = new frmParts();
         DialogResult result = frmPart.ShowDialog();
         if (result == DialogResult.OK)
         {
             string strPId = frmPart.PartsID;
             DataTable dpt = DBHelper.GetTable("", "v_parts_chooser", "*", " parts_id='" + strPId + "'", "", "");
             if (dpt.Rows.Count > 0)
             {
                 DataRow dpr = dpt.Rows[0];
                 if (listMater.Contains(CommonCtrl.IsNullToString(dpr["ser_parts_code"])))
                 {
                     if (MessageBoxEx.Show("已添加此用料,是否继续添加?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
                     {
                         return;
                     }
                 }
                 for (int i = 0; i <= intMrows; i++)
                 {
                     if (string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["parts_code"].Value)))
                     {
                         dgvMaterials.Rows[i].Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
                         dgvMaterials.Rows[i].Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
                         dgvMaterials.Rows[i].Cells["norms"].Value = CommonCtrl.IsNullToString(dpr["model"]);
                         dgvMaterials.Rows[i].Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["unit"]);
                         dgvMaterials.Rows[i].Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
                         dgvMaterials.Rows[i].Cells["quantity"].Value = "1.0";
                         dgvMaterials.Rows[i].Cells["unit_price"].Value = !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dpr["ref_out_price"])) ? Math.Round(Convert.ToDecimal(CommonCtrl.IsNullToString(dpr["ref_out_price"])), 2).ToString("0.00") : "0.00";
                         string strPzk = !string.IsNullOrEmpty(labMemberLZkS.Text) ? labMemberLZkS.Text.Replace("%", "") : "100";
                         #region 验证是否存在特殊配件
                         string strMdic = DBHelper.GetSingleValue("获取特殊配件折扣", "tb_CustomerSer_member_setInfo_parts", "parts_discount", "setInfo_id='" + strSetInfoid + "' and parts_id='" + strPId + "' and enable_flag='" + Convert.ToInt32(DataSources.EnumEnableFlag.USING).ToString() + "'", "");
                         if (!string.IsNullOrEmpty(strMdic))
                         {
                             strPzk = strMdic;
                         }
                         #endregion
                         //会员折扣
                         dgvMaterials.Rows[i].Cells["Mmember_discount"].Value = Convert.ToString(Convert.ToDecimal(strPzk));
                         string strNum = !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["quantity"].Value)) ? Math.Round(Convert.ToDecimal(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["quantity"].Value)), 2).ToString("0.0") : "0.0";
                         string strUMoney = !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["unit_price"].Value)) ? dgvMaterials.Rows[i].Cells["unit_price"].Value.ToString() : "0.00";
                         //会员单价
                         dgvMaterials.Rows[i].Cells["Mmember_price"].Value = Math.Round((Convert.ToDecimal(strUMoney = strUMoney == "" ? "0.00" : strUMoney) * Convert.ToDecimal(!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["Mmember_discount"].Value)) ? CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["Mmember_discount"].Value) : "0.00") / 100), 2).ToString("0.00");
                         dgvMaterials.Rows[i].Cells["sum_money"].Value = Convert.ToString(Convert.ToDecimal(strNum = strNum == "" ? "0" : strNum) * Convert.ToDecimal(strUMoney = strUMoney == "" ? "0" : strUMoney) * Convert.ToDecimal(!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["Mmember_discount"].Value)) ? CommonCtrl.IsNullToString(dgvMaterials.Rows[i].Cells["Mmember_discount"].Value) : "0") / 100);
                         dgvMaterials.Rows[i].Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
                         dgvMaterials.Rows[i].Cells["Mremarks"].Value = CommonCtrl.IsNullToString(dpr["remark"]);
                         dgvMaterials.Rows[i].Cells["vehicle_brand"].Value = CommonFuncCall.GetCarTypeForMa((CommonCtrl.IsNullToString(dpr["ser_parts_code"])));
                         dgvMaterials.Rows[i].Cells["parts_id"].Value = frmPart.PartsID;
                         dgvMaterials.Rows[i].Cells["Mthree_warranty"].Value = "否";
                         dgvMaterials.Rows[i].Cells["Mdata_source"].Value = CommonCtrl.IsNullToString(dpr["data_source"]);
                         dgvMaterials.Rows[i].Cells["Mthree_warranty"].ReadOnly = CommonCtrl.IsNullToString(dpr["data_source"]) == Convert.ToInt32(DataSources.EnumDataSources.SELFBUILD).ToString() ? true : false;
                         dcPmoney = 0;
                         foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
                         {
                             if (!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["sum_money"].Value)))
                             {
                                 dcPmoney += Convert.ToDecimal(dgvr.Cells["sum_money"].Value);
                             }
                         }
                         txtFSumMoney.Caption = dcPmoney.ToString();
                         txtFTaxCost.Caption = Math.Round((Convert.ToDecimal(!string.IsNullOrEmpty(txtFSumMoney.Caption.Trim()) ? txtFSumMoney.Caption.Trim() : "0.00") * Convert.ToDecimal(!string.IsNullOrEmpty(txtFTaxRate.Caption.Trim()) ? txtFTaxRate.Caption.Trim() : "0.00") / 100), 2).ToString("0.00");//配件税额
                         txtFSum.Caption = Math.Round((Convert.ToDecimal(!string.IsNullOrEmpty(txtFSumMoney.Caption.Trim()) ? txtFSumMoney.Caption.Trim() : "0.00") + Convert.ToDecimal(!string.IsNullOrEmpty(txtFTaxCost.Caption.Trim()) ? txtFTaxCost.Caption.Trim() : "0.00")), 2).ToString("0.00");//配件价税合计
                         txtShouldSum.Caption = Math.Round((Convert.ToDecimal(!string.IsNullOrEmpty(txtHSum.Caption.Trim()) ? txtHSum.Caption.Trim() : "0.00") + Convert.ToDecimal(!string.IsNullOrEmpty(txtFSum.Caption.Trim()) ? txtFSum.Caption.Trim() : "0.00") + Convert.ToDecimal(!string.IsNullOrEmpty(txtOSum.Caption.Trim()) ? txtOSum.Caption.Trim() : "0")), 2).ToString("0.00");//应收总额
                         strShouldSum = Math.Round(Convert.ToDecimal(txtShouldSum.Caption), 2).ToString("0.00");
                         txtReceivedSum.Caption = Math.Round((Convert.ToDecimal(!string.IsNullOrEmpty(txtHSum.Caption.Trim()) ? txtHSum.Caption.Trim() : "0.00") + Convert.ToDecimal(!string.IsNullOrEmpty(txtFSum.Caption.Trim()) ? txtFSum.Caption.Trim() : "0.00") + Convert.ToDecimal(!string.IsNullOrEmpty(txtOSum.Caption.Trim()) ? txtOSum.Caption.Trim() : "0") - Convert.ToDecimal(!string.IsNullOrEmpty(txtPrivilegeCost.Caption.Trim()) ? txtPrivilegeCost.Caption.Trim() : "0.00")), 2).ToString("0.00");//实收总额
                         dgvMaterials.Rows.Add(1);
                         break;
                     }
                 }
             }
         }
         foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
         {
             string strPCode = CommonCtrl.IsNullToString(dgvr.Cells["parts_code"].Value);
             if (!string.IsNullOrEmpty(strPCode) && !listMater.Contains(strPCode))
             {
                 listMater.Add(strPCode);
             }
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:88,代码来源:UCRepairBalanceAddOrEdit.cs

示例12: dgvMaterials_CellClick

 private void dgvMaterials_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 1 || e.ColumnIndex == 2 || e.ColumnIndex == 3)
         {
             dcPmoney = 0;
             frmParts frmPart = new frmParts();
             DialogResult result = frmPart.ShowDialog();
             if (result == DialogResult.OK)
             {
                 string strPId = frmPart.PartsID;
                 DataTable dpt = DBHelper.GetTable("", "v_parts_chooser", "*", " parts_id='" + strPId + "'", "", "");
                 if (dpt.Rows.Count > 0)
                 {
                     DataRow dpr = dpt.Rows[0];
                     dgvMaterials.Rows[e.RowIndex].Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
                     dgvMaterials.Rows[e.RowIndex].Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
                     dgvMaterials.Rows[e.RowIndex].Cells["norms"].Value = CommonCtrl.IsNullToString(dpr["model"]);
                     dgvMaterials.Rows[e.RowIndex].Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["unit"]);
                     dgvMaterials.Rows[e.RowIndex].Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
                     dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value = "1";
                     dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value = CommonCtrl.IsNullToString(dpr["ref_out_price"]);
                     string strPzk = !string.IsNullOrEmpty(labMemberLZkS.Text) ? labMemberLZkS.Text : "10";
                     //会员折扣
                     dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value = Convert.ToString(Convert.ToDecimal(strPzk) * 10);
                     string strNum = dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value.ToString();
                     string strUMoney = dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value != null ? dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value.ToString() : "0";
                     //会员单价
                     dgvMaterials.Rows[e.RowIndex].Cells["Mmember_price"].Value = Convert.ToString(Convert.ToDecimal(strUMoney = strUMoney == "" ? "0" : strUMoney) * Convert.ToDecimal(dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value) / 10);
                     dgvMaterials.Rows[e.RowIndex].Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
                     dgvMaterials.Rows[e.RowIndex].Cells["Mremarks"].Value = CommonCtrl.IsNullToString(dpr["remark"]);
                     dgvMaterials.Rows[e.RowIndex].Cells["vehicle_brand"].Value = CommonFuncCall.GetCarTypeForMa((CommonCtrl.IsNullToString(dpr["ser_parts_code"])));
                 }
                 foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
                 {
                     if (!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["sum_money"].Value)))
                     {
                         dcPmoney += Convert.ToDecimal(dgvr.Cells["sum_money"].Value);
                     }
                 }
             }
             txtFSumMoney.Caption = dcPmoney.ToString();
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:50,代码来源:UCRepairBalanceAddOrEdit.cs

示例13: dgvMaterials_CellDoubleClick

        private void dgvMaterials_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmParts frmPart = new frmParts();
            DialogResult result = frmPart.ShowDialog();
            if (result == DialogResult.OK)
            {
                dcPmoney = 0;
                string strPId = frmPart.PartsID;
                DataTable dpt = DBHelper.GetTable("", "v_parts", "*", " parts_id='" + strPId + "'", "", "");
                if (dpt.Rows.Count > 0)
                {
                    DataRow dpr = dpt.Rows[0];
                    dgvMaterials.Rows[e.RowIndex].Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["norms"].Value = CommonCtrl.IsNullToString(dpr["model"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["default_unit_name"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
                    dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value = "1";
                    dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value = CommonCtrl.IsNullToString(dpr["highest_out_price"]);
                    string strPzk = !string.IsNullOrEmpty(strMemberPZk) ? strMemberPZk : "10";
                    //会员折扣
                    dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value = Convert.ToString(Convert.ToDecimal(strPzk) * 10);
                    string strNum = dgvMaterials.Rows[e.RowIndex].Cells["quantity"].Value.ToString();
                    string strUMoney = !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value)) ? dgvMaterials.Rows[e.RowIndex].Cells["unit_price"].Value.ToString() : "0";
                    //会员单价
                    dgvMaterials.Rows[e.RowIndex].Cells["Mmember_price"].Value = Convert.ToString(Convert.ToDecimal(strUMoney = strUMoney == "" ? "0" : strUMoney) * Convert.ToDecimal(!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value)) ? CommonCtrl.IsNullToString(dgvMaterials.Rows[e.RowIndex].Cells["Mmember_discount"].Value) : "0") / 10);
                    dgvMaterials.Rows[e.RowIndex].Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["Mremarks"].Value = CommonCtrl.IsNullToString(dpr["remark"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["vehicle_brand"].Value = CommonCtrl.IsNullToString(dpr["v_brand_name"]);
                    dgvMaterials.Rows[e.RowIndex].Cells["M_Id"].Value = frmPart.PartsID;
                }
                dcPmoney = 0;
                foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
                {
                    if (!string.IsNullOrEmpty(CommonCtrl.IsNullToString(dgvr.Cells["sum_money"].Value)))
                    {
                        dcPmoney += Convert.ToDecimal(dgvr.Cells["sum_money"].Value);
                    }
                }
                txtFSumMoney.Caption = dcPmoney.ToString();
                txtFTaxCost.Caption = Convert.ToString(Convert.ToDecimal(!string.IsNullOrEmpty(txtFSumMoney.Caption.Trim()) ? txtFSumMoney.Caption.Trim() : "0") * Convert.ToDecimal(!string.IsNullOrEmpty(txtFTaxRate.Caption.Trim()) ? txtFTaxRate.Caption.Trim() : "0"));//配件税额
                txtFSum.Caption = Convert.ToString(Convert.ToDecimal(!string.IsNullOrEmpty(txtFSumMoney.Caption.Trim()) ? txtFSumMoney.Caption.Trim() : "0") + Convert.ToDecimal(!string.IsNullOrEmpty(txtFTaxCost.Caption.Trim()) ? txtFTaxCost.Caption.Trim() : "0"));//配件价税合计
                txtShouldSum.Caption = Convert.ToString(Convert.ToDecimal(!string.IsNullOrEmpty(txtHSum.Caption.Trim()) ? txtHSum.Caption.Trim() : "0") + Convert.ToDecimal(!string.IsNullOrEmpty(txtFSum.Caption.Trim()) ? txtFSum.Caption.Trim() : "0") + Convert.ToDecimal(!string.IsNullOrEmpty(txtOSum.Caption.Trim()) ? txtOSum.Caption.Trim() : "0") - Convert.ToDecimal(!string.IsNullOrEmpty(txtPrivilegeCost.Caption.Trim()) ? txtPrivilegeCost.Caption.Trim() : "0"));//应收总额
                dgvMaterials.Rows.Add(1);
            }

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

示例14: eidtParts_Click

 private void eidtParts_Click(object sender, EventArgs e)
 {
     try
     {
         int intMrows = dgvMaterials.CurrentRow.Index;
         if (intMrows >= 0)
         {
             string strPcode = CommonCtrl.IsNullToString(dgvMaterials.Rows[intMrows].Cells["parts_code"].Value);
             if (!string.IsNullOrEmpty(strPcode))
             {
                 frmParts frmPart = new frmParts();
                 DialogResult result = frmPart.ShowDialog();
                 if (result == DialogResult.OK)
                 {
                     string strPId = frmPart.PartsID;
                     DataTable dpt = DBHelper.GetTable("", "v_parts_chooser", "*", " parts_id='" + strPId + "'", "", "");
                     if (dpt.Rows.Count > 0)
                     {
                         DataRow dpr = dpt.Rows[0];
                         if (listMater.Contains(CommonCtrl.IsNullToString(dpr["ser_parts_code"])))
                         {
                             if (MessageBoxEx.Show("已添加此配件,是否继续添加?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
                             {
                                 return;
                             }
                         }
                         dgvMaterials.Rows[intMrows].Cells["parts_code"].Value = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
                         dgvMaterials.Rows[intMrows].Cells["parts_name"].Value = CommonCtrl.IsNullToString(dpr["parts_name"]);
                         dgvMaterials.Rows[intMrows].Cells["unit"].Value = CommonCtrl.IsNullToString(dpr["unit"]);
                         dgvMaterials.Rows[intMrows].Cells["drawn_no"].Value = CommonCtrl.IsNullToString(dpr["drawing_num"]);
                         dgvMaterials.Rows[intMrows].Cells["quantity"].Value = "0";
                         dgvMaterials.Rows[intMrows].Cells["unit_price"].Value = !string.IsNullOrEmpty(CommonCtrl.IsNullToString(dpr["ref_out_price"])) ? CommonCtrl.IsNullToString(dpr["ref_out_price"]) : "0";
                         dgvMaterials.Rows[intMrows].Cells["whether_imported"].Value = CommonCtrl.IsNullToString(dpr["is_import"]) == "1" ? "是" : "否";
                         dgvMaterials.Rows[intMrows].Cells["vehicle_brand"].Value = CommonFuncCall.GetCarTypeForMa((CommonCtrl.IsNullToString(dpr["ser_parts_code"])));
                         listMater.Remove(strPcode);
                         foreach (DataGridViewRow dgvr in dgvMaterials.Rows)
                         {
                             string strPCode = CommonCtrl.IsNullToString(dgvr.Cells["parts_code"].Value);
                             if (!string.IsNullOrEmpty(strPCode) && !listMater.Contains(strPCode))
                             {
                                 listMater.Add(strPCode);
                             }
                         }
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:53,代码来源:UCOldPartsReceiptAddOrEdit.cs

示例15: txtPartCode_ChooserClick

 private void txtPartCode_ChooserClick(object sender, EventArgs e)
 {
     frmParts frmPart = new frmParts();
     DialogResult result = frmPart.ShowDialog();
     if (result == DialogResult.OK)
     {
         string strPId = frmPart.PartsID;
         DataTable dpt = DBHelper.GetTable("", "v_parts", "*", " parts_id='" + strPId + "'", "", "");
         if (dpt.Rows.Count > 0)
         {
             DataRow dpr = dpt.Rows[0];
             txtPartCode.Text = CommonCtrl.IsNullToString(dpr["ser_parts_code"]);
             txtPartType.Caption = GetDicName(CommonCtrl.IsNullToString(dpr["parts_type"]));
             txtPartName.Caption = CommonCtrl.IsNullToString(dpr["parts_name"]);
         }
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:17,代码来源:RepairQueryManager.cs


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