protected void btnsave_Click(object sender, EventArgs e)
        {
            try
            {
                var list = new List <Mod_TMC_TRAIN_ITEM>();

                var mod = new Mod_TMC_TRAIN_MAIN()
                {
                    C_ID        = txtcode.Text,
                    C_STATION   = txtstation.Text,
                    C_PLANNO    = txtplanno.Text,
                    C_LINE      = txtline.Text,
                    N_TRAIN_NUM = Convert.ToDecimal(txtnum.Text == "" ? "0" : txtnum.Text),
                    D_EDIT_DT   = DateTime.Now,
                    C_REMARK    = txtshdw.Text,
                    D_DT        = Convert.ToDateTime(txtdate.Value)
                };

                for (int i = 0; i < rptList.Items.Count; i++)
                {
                    HtmlInputCheckBox cbxselect = (HtmlInputCheckBox)rptList.Items[i].FindControl("cbxselect");
                    TextBox           txtwgt    = (TextBox)rptList.Items[i].FindControl("txtwgt");
                    TextBox           txtremark = (TextBox)rptList.Items[i].FindControl("txtremark");

                    var moditem = new Mod_TMC_TRAIN_ITEM()
                    {
                        C_ID = cbxselect.Value, N_WGT = Convert.ToDecimal(txtwgt.Text == "" ? "0" : txtwgt.Text), C_REMARK = txtremark.Text
                    };
                    list.Add(moditem);
                }

                if (tmc_train_main.UpdateTrainDay(mod, list))
                {
                    WebMsg.MessageBox("保存成功", "train_day_apply.aspx");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #2
0
        //提交审批
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(hidEmpID.Value))
                {
                    //文件
                    Mod_TMF_FILEINFO modFile = new Mod_TMF_FILEINFO();
                    modFile.C_FLOW_ID = dropFlow.SelectedValue;//流程
                    modFile.C_EMP_ID  = ltlUserID.Text;
                    modFile.C_TITLE   = txtTitle.Text;
                    modFile.C_CONTENT = txtContent.Text;
                    modFile.N_TYPE    = 0;
                    modFile.C_TASK_ID = ltlConN0.Text;
                    modFile.C_STEP_ID = hidSetpID.Value;//步骤

                    //步骤操作人
                    Mod_TMB_FILE_NEXT_EMP modNextEmp = new Mod_TMB_FILE_NEXT_EMP();
                    modNextEmp.C_FILE_ID     = ID;
                    modNextEmp.C_NEXT_EMP_ID = hidEmpID.Value;
                    modNextEmp.C_STEP_ID     = hidSetpID.Value;

                    if (tmo_con.ApproveCon(modFile, modNextEmp))
                    {
                        WebMsg.MessageBox("提交成功", "ConList.aspx");
                    }
                    else
                    {
                        WebMsg.MessageBox("提交失败");
                    }
                }
                else
                {
                    WebMsg.MessageBox("请选择下一处理人");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (!GetCheckPepeat(dropArea.SelectedItem.Value, Start.Value, End.Value))
         {
             if (InsertAreaPlan(dropArea.SelectedItem.Value, Start.Value, End.Value, txtNum.Value))
             {
                 Response.Write("<script>alert('添加成功'); window.parent.document.getElementById(\"btn_Search\").click();</script>");
             }
         }
         else
         {
             WebMsg.MessageBox("当前区域时间重复");
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.Message);
     }
 }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //获取用户所属公司名称
                var BaseUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];
                if (BaseUser != null)
                {
                    try
                    {
                        hidUserID.Value = BaseUser.Id;

                        GetUID();
                    }
                    catch (Exception ex)
                    {
                        WebMsg.MessageBox(ex.Message);
                    }
                }
            }
        }
Beispiel #5
0
 private void Query2()
 {
     try
     {
         DataTable dt = bll.GetLog(txtphcx.Text.Trim(), txtBegTime.Text, txtEndTime.Text, txtghcx.Text.Trim()).Tables[0];
         if (dt.Rows.Count > 0)
         {
             rptList2.DataSource = dt;
             rptList2.DataBind();
         }
         else
         {
             rptList2.DataSource = null;
             rptList2.DataBind();
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.ToString());
     }
 }
Beispiel #6
0
        //停用
        protected void Button3_Click(object sender, EventArgs e)
        {
            List <string> listID = new List <string>();

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                HtmlInputCheckBox cbxselect = (HtmlInputCheckBox)rptList.Items[i].FindControl("cbxselect");
                if (cbxselect.Checked)
                {
                    listID.Add(cbxselect.Value);
                }
            }
            if (tb_std_config.UpdateStatus(listID, 0))
            {
                WebMsg.MessageBox("提交成功");
            }
            else
            {
                WebMsg.MessageBox("提交失败");
            }
        }
Beispiel #7
0
        protected void btnCheck_Click(object sender, EventArgs e)
        {
            var list = new List <string>();

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                HtmlInputCheckBox cbxselect = (HtmlInputCheckBox)rptList.Items[i].FindControl("cbxselect");
                if (cbxselect.Checked)
                {
                    list.Add(cbxselect.Value);
                }
            }
            //获取用户所属公司名称
            var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];

            if (tmc_train_main.UpdateTrainMain(list.Distinct().ToList(), vUser?.Name))
            {
                WebMsg.MessageBox("提交成功");
                BindList();
            }
        }
        //提交邢钢处理(客户)
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(hid.Value))
                {
                    Mod_TMQ_QUA_MAIN mod = new Mod_TMQ_QUA_MAIN();
                    mod = qua.GetModel(hid.Value);
                    var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];
                    if (vUser.Roles.Where(x => x.C_CODE == RoleCode).Any())
                    {
                        mod.N_status = 0;
                    }

                    if (qua.Update(mod))
                    {
                        this.btnAdd.Visible    = false; //添加行
                        this.btndelrow.Visible = false; //删除行
                        this.btnsave.Visible   = false; //保存
                        this.btnSubmit.Visible = false; //提交
                        btndoc.Visible         = false; //文档
                        //btnAudit.Visible = false;//审批
                        btnCheck.Visible = false;       //送审

                        WebMsg.MessageBox("提交成功");

                        //Page pa = (Page)System.Web.HttpContext.Current.CurrentHandler;
                        //ClientScript.RegisterClientScriptBlock(pa.GetType(), "aa", "<script language='javascript'>alert('提交成功!');</script>");
                    }
                }
                else
                {
                    WebMsg.MessageBox("请点击保存");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #9
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                var list = new List <Mod_TMD_HY_INFO>();

                for (int i = 0; i < rptList.Items.Count; i++)
                {
                    HtmlInputCheckBox cbxID = (HtmlInputCheckBox)rptList.Items[i].FindControl("cbxID");

                    HtmlInputText txtN_KC_NUM = (HtmlInputText)rptList.Items[i].FindControl("txtN_KC_NUM");
                    HtmlInputText txtN_ZC_NUM = (HtmlInputText)rptList.Items[i].FindControl("txtN_ZC_NUM");
                    HtmlInputText txtN_YB_NUM = (HtmlInputText)rptList.Items[i].FindControl("txtN_YB_NUM");

                    Literal ltlC_TYPE = (Literal)rptList.Items[i].FindControl("ltlC_TYPE");//N/Y INSERT/UPDATE

                    Mod_TMD_HY_INFO mod = new Mod_TMD_HY_INFO();
                    mod.C_ID = cbxID.Value;

                    mod.N_KC_NUM = Convert.ToDecimal(txtN_KC_NUM.Value == "" ? "0" : txtN_KC_NUM.Value);
                    mod.N_ZC_NUM = Convert.ToDecimal(txtN_ZC_NUM.Value == "" ? "0" : txtN_ZC_NUM.Value);
                    mod.N_YB_NUM = Convert.ToDecimal(txtN_YB_NUM.Value == "" ? "0" : txtN_YB_NUM.Value);

                    mod.C_EMP_NAME = ltlEmpName.Text;
                    mod.C_TYPE     = ltlC_TYPE.Text;

                    list.Add(mod);
                }
                if (tmd_hy_plan.Insert_Update_Info(list))
                {
                    GetList();
                    WebMsg.MessageBox("保存成功");
                    //this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('保存成功');</script>", false);
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
        /// <summary>
        /// 提交
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool    result = false;
            decimal wgt    = 0;

            foreach (RepeaterItem rpt in rptList.Items)
            {
                HtmlInputCheckBox chkID   = (HtmlInputCheckBox)rpt.FindControl("chkID");
                Literal           OrderNo = (Literal)rpt.FindControl("ltlOrderNo");
                Literal           ltlWGT  = (Literal)rpt.FindControl("ltlWGT");
                if (chkID.Checked)
                {
                    wgt += Convert.ToDecimal(ltlWGT.Text);

                    Mod_TMO_ORDER_MATCH mod = new Mod_TMO_ORDER_MATCH();
                    mod.C_ORDER_NO     = ltlOrderNo.Text;
                    mod.C_MATCH_ID     = chkID.Value;
                    mod.C_OLD_ORDER_NO = OrderNo.Text;
                    mod.C_TYPE         = Convert.ToDecimal(ltlType.Text);
                    if (tmo_order_match.Add(mod))//记录
                    {
                        Mod_TS_CUSTFILE modCust = ts_custfile.GetModel(ltlCustID.Text);

                        if (trc_roll_prodcut.UpdateMatch(chkID.Value, ltlOrderNo.Text, ltlConNo.Text, modCust.C_NO, modCust.C_NAME, "N"))//更新线材自由状态
                        {
                            result = true;
                        }
                    }
                }
            }
            if (result)
            {
                //更新订单匹配量
                if (tmo_condetails.UpdateMatch(wgt, ltlOrderNo.Text, Convert.ToInt32(ltlType.Text)))
                {
                    WebMsg.MessageBox("提交成功");
                    GetList();
                }
            }
        }
Beispiel #11
0
        //提交审批
        protected void btnSave_Click(object sender, EventArgs e)
        {
            var BaseUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];

            if (BaseUser != null)
            {
                string stepID = flowstep.GetFirstStep(dropFlow.SelectedValue);//获取流程第一步骤
                if (!string.IsNullOrEmpty(stepID))
                {
                    //插入新数据
                    Mod_TMF_FILEINFO mod = new Mod_TMF_FILEINFO();
                    mod.C_FLOW_ID = dropFlow.SelectedValue;
                    mod.C_EMP_ID  = ltlUserID.Text;
                    mod.C_TITLE   = txtTitle.Text;
                    mod.C_CONTENT = txtContent.Text;
                    mod.N_TYPE    = 0;
                    mod.C_TASK_ID = ltlConN0.Text;
                    mod.C_STEP_ID = stepID;
                    mod.D_SB_DT   = DateTime.Now;
                    if (fileinfo.Add(mod))                                 //插入文件事务
                    {
                        #region                                            //更新合同/明细状态
                        if (con.UpdateConStatus(1, ltlConN0.Text))         //更新合同
                        {
                            if (condetails.UpdateStatus(1, ltlConN0.Text)) //更新合同明细
                            {
                                WebMsg.MessageBox("提交成功", "ConList.aspx");
                            }
                        }
                        #endregion
                    }
                }
                else
                {
                    WebMsg.MessageBox("当前没有流程节点,请联系管理员");
                    return;
                }
            }
        }
Beispiel #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var BaseUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];
                if (BaseUser != null)
                {
                    try
                    {
                        ltlC_EMP_ID.Text   = BaseUser.Id;
                        ltlC_EMP_NAME.Text = BaseUser.Name;
                        GetMat();
                        GetArea();

                        DateTime dt = DateTime.Now;
                        txtStart.Value = Convert.ToDateTime(dt).ToString("yyy-MM-dd");
                        txtEnd.Value   = dt.AddMonths(1).AddDays(-(dt.Day)).ToString("yyy-MM-dd");

                        if (!string.IsNullOrEmpty(Request.QueryString["type"]))
                        {
                            ltlMatType.Text = Request.QueryString["type"];
                            if (ltlMatType.Text == "6")
                            {
                                txtSPEC1.Disabled = !txtSPEC1.Disabled;
                                txtSPEC2.Disabled = !txtSPEC2.Disabled;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        WebMsg.MessageBox(ex.Message);
                    }
                }
                else
                {
                    WebMsg.CheckUserLogin();
                }
            }
        }
Beispiel #13
0
 private void Query()
 {
     try
     {
         DataTable dt = null;
         dt = bll_Interface_FR.GetTMFYDBZ(txtFYDH.Text.Trim(), "", txtGG.Text.Trim(), txtGZ.Text.Trim()).Tables[0];
         if (dt.Rows.Count > 0)
         {
             rptList.DataSource = dt;
             rptList.DataBind();
         }
         else
         {
             rptList.DataSource = null;
             rptList.DataBind();
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.ToString());
     }
 }
Beispiel #14
0
        //删除
        protected void btnDel_Click(object sender, EventArgs e)
        {
            string IDList = "";

            foreach (RepeaterItem item in rptList.Items)
            {
                HtmlInputCheckBox chkSelect = (HtmlInputCheckBox)item.FindControl("chkSelect");
                if (chkSelect.Checked)
                {
                    IDList += "'" + chkSelect.Value + "',";
                }
            }
            if (!string.IsNullOrEmpty(IDList))
            {
                IDList = IDList.Substring(0, IDList.Length - 1);
                if (notice.UpdateStatus(IDList, 0))
                {
                    WebMsg.MessageBox("删除成功");
                    ByPageBind();
                }
            }
        }
 //评分
 protected void EB_Click(object sender, EventArgs e)
 {
     try
     {
         Mod_TMC_TECH_CONSULT mod = tmc_tech_consult.GetModel(ltlID.Text);
         if (mod != null)
         {
             mod.N_XG_EVAL     = Convert.ToDecimal(dropNum.SelectedItem.Text);
             mod.N_STATE       = 3;
             mod.C_XG_EVAL_EMP = ltlUserName.Text;
             mod.D_XG_EVAL_DT  = DateTime.Now;
             if (tmc_tech_consult.Update(mod))
             {
                 WebMsg.MessageBox("评分成功", "Consult_List.aspx");
             }
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.Message);
     }
 }
Beispiel #16
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            try
            {
                var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];

                var mod = new Mod_TMC_TRAIN_ITEM()
                {
                    C_EMPNAME    = vUser.Name,
                    C_PKID       = vUser.Id,
                    C_AREA       = droparea.SelectedItem.Text,
                    C_CONNO      = txtC_CONNO.Text,
                    C_DH_COMPANY = txtC_DH_COMPANY.Text,
                    C_SH_COMPANY = txtC_SH_COMPANY.Text,
                    C_STATION    = txtC_STATION.Text,
                    N_TRAIN_NUM  = Convert.ToDecimal(txtN_TRAIN_NUM.Text),
                    C_CUSTNO     = txtC_CUSTNO.Text,
                    C_CUSTNAME   = txtC_CUSTNAME.Text,
                    C_KH_BANK    = txtC_KH_BANK.Text,
                    C_TAXNO      = txtC_TAXNO.Text,
                    C_ADDRESS    = txtC_ADDRESS.Text,
                    C_TEL        = txtC_TEL.Text,
                    C_ACCOUNT    = txtC_ACCOUNT.Text,
                    C_FLAG       = dropflag.SelectedValue,
                    C_BILLCODE   = randomnumber.GetTrainCode(),
                    D_MONTH      = Convert.ToDateTime(txtStart.Value + "-1"),
                    C_LINE       = txtLine.Text
                };

                if (tmc_train_item.Add(mod))
                {
                    WebMsg.MessageBox("保存成功");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #17
0
        //日计划导入NC
        protected void btnplan_nc_Click(object sender, EventArgs e)
        {
            try
            {
                int           num1       = 0; //成功
                int           num2       = 0; //失败
                ApiDayPlan    apidayplan = new ApiDayPlan();
                StringBuilder strResult  = new StringBuilder();
                for (int i = 0; i < rptList.Items.Count; i++)
                {
                    HtmlInputCheckBox cbxselect   = (HtmlInputCheckBox)rptList.Items[i].FindControl("cbxselect");
                    Literal           ltlplancode = (Literal)rptList.Items[i].FindControl("ltlplancode");

                    if (cbxselect.Checked)
                    {
                        string        filePath    = "~/FileInterface/download/" + ltlplancode.Text + ".xml";
                        string        xmlFileName = Server.MapPath(filePath);
                        List <string> resList     = apidayplan.SendXmlDayPlan(ltlplancode.Text, xmlFileName, ltlempid.Text);
                        if (resList[0].ToString() == "1")
                        {
                            num1 += 1;
                            tmp_dayplan.UpdateDayPlanStatus(ltlplancode.Text);//更新日计划状态
                        }
                        else
                        {
                            num2 += 1;
                        }
                    }
                }
                string msg = num1 + "条导入成功," + "失败:" + num2 + "条";
                this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('" + msg + "');</script>", false);
                GetList();//加载日计划
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #18
0
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                var BaseUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];

                Mod_TMB_NOTICE mod = new Mod_TMB_NOTICE();

                mod.C_CLASS    = dropClass.SelectedValue;
                mod.C_TITLE    = txtTitle.Text;
                mod.C_CONTENT  = content1.Value;
                mod.C_EMP_ID   = BaseUser.Id;
                mod.C_EMP_NAME = BaseUser.Name;
                if (notice.Add(mod))
                {
                    WebMsg.MessageBox("添加成功", "Notice.aspx");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
        //计划申请
        protected void btnapply_Click(object sender, EventArgs e)
        {
            try
            {
                var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];
                var mod   = new Mod_TMC_TRAIN_MAIN()
                {
                    C_ID      = randomnumber.GetTrainDayCode(),
                    C_EMPID   = vUser.Id,
                    C_EMPNAME = vUser.Name
                };

                if (tmc_train_main.Insert(mod))
                {
                    string url = "train_day_edit.aspx?ID=" + mod.C_ID;
                    Response.Redirect(url);
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
         {
             try
             {
                 ltlStepID.Text = Request.QueryString["ID"];
                 Mod_TS_ROLE mod = ts_role.GetModel(Request.QueryString["ID"]);
                 if (mod != null)
                 {
                     ltlRoleName.Text = mod.C_NAME;
                 }
                 GetList();
             }
             catch (Exception ex)
             {
                 WebMsg.MessageBox(ex.Message);
             }
         }
     }
 }
Beispiel #21
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];

            if (vUser.Roles.Where(x => x.C_CODE == RoleCode).Any())
            {
                Save(true);
            }
            else
            {
                if (ltlStat.Text == "2" && !string.IsNullOrEmpty(hid.Value))
                {
                    if (qua.UpdateMoneyAndDate(txtPFMONEY.Value, txtPFDATE.Value, hid.Value))
                    {
                        WebMsg.MessageBox("保存成功");
                    }
                }
                else
                {
                    Save(true);
                }
            }
        }
Beispiel #22
0
 private void Query()
 {
     try
     {
         DataTable dt = null;
         dt = bll_Interface_FR.GetTMZJB(txtCKDH.Text.Trim(), Convert.ToDateTime(txtBegTime.Text), Convert.ToDateTime(txtEndTime.Text)).Tables[0];
         if (dt.Rows.Count > 0)
         {
             rptList.DataSource = dt;
             rptList.DataBind();
         }
         else
         {
             rptList.DataSource = null;
             rptList.DataBind();
             txtCKDH.Text = "";
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.ToString());
     }
 }
Beispiel #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                var BaseUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];
                if (BaseUser != null)
                {
                    try
                    {
                        ltlEmpID.Text = BaseUser.Id;

                        txtStart.Text = DateTime.Now.AddDays(-1).ToString("yyy-MM-dd");
                        txtEnd.Text   = DateTime.Now.ToString("yyy-MM-dd");
                        GetFlow();

                        GetWork();
                    }
                    catch (Exception ex)
                    {
                        WebMsg.MessageBox(ex.Message);
                    }
                }
            }
        }
Beispiel #24
0
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                decimal sumWgt = 0;
                for (int i = 0; i < rptList.Items.Count; i++)
                {
                    TextBox txtWgt = (TextBox)rptList.Items[i].FindControl("txtWgt");//数量

                    if (!string.IsNullOrEmpty(txtWgt.Text))
                    {
                        sumWgt += Convert.ToDecimal(txtWgt.Text);
                    }
                }
                if (sumWgt <= Convert.ToDecimal(hidsf.Value))
                {
                    if (SaveCon(0))
                    {
                        ScriptManager.RegisterStartupScript(UpdatePanel1, this.Page.GetType(), "", "_closemsg('保存成功');", true);
                        GetOrderList();
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(UpdatePanel1, this.Page.GetType(), "", "_closemsg('保存失败');", true);
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(UpdatePanel1, this.Page.GetType(), "", "_closemsg('新合同总量已超原合同待履行量!');", true);
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #25
0
        //删除发运单
        protected void btndel_Click(object sender, EventArgs e)
        {
            try
            {
                if (tmd_dispatch.DelNCFYD(ltlpkid.Text))
                {
                    if (tmd_dispatch.DelFYD(txtsendcode.Text, ltlempid.Text))
                    {
                        var logger = Logger.CreateLogger(this.GetType());
                        logger.Info("用户ID" + ltlempid.Text + DateTime.Now.ToString() + ";发运单号" + txtsendcode.Text);

                        WebMsg.MessageBox("删除成功", "fydList.aspx");
                    }
                }
                else
                {
                    WebMsg.MessageBox("请先同步删除NC发运单!");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Beispiel #26
0
 protected void btndel_Click(object sender, EventArgs e)
 {
     try
     {
         bool res = false;
         for (int i = 0; i < rptList.Items.Count; i++)
         {
             HtmlInputCheckBox cbxselect = (HtmlInputCheckBox)rptList.Items[i].FindControl("cbxselect");
             if (cbxselect.Checked)
             {
                 res = tmc_train_item.DelTrainPlan(cbxselect.Value);
             }
         }
         if (res)
         {
             WebMsg.MessageBox("删除成功");
             BindList();
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.Message);
     }
 }
Beispiel #27
0
        //销售订单导入NC
        protected void Button1_Click(object sender, EventArgs e)
        {
            #region //导入NC

            Mod_TMO_CON mod = tmo_con.GetModel(txtCON.Text);

            List <ApiOrderDto> orderDto = new List <ApiOrderDto>();
            ApiOrderDto        dto      = new ApiOrderDto();
            dto.NC_ID     = "";
            dto.SaleCode  = txtConNo.Text;
            dto.ConNO     = mod.C_CON_NO;
            dto.D_NC_DATE = mod.D_MOD_DT.ToString();
            orderDto.Add(dto);
            string        result      = "";
            string        filePath    = "~/FileInterface/download/" + txtConNo.Text + ".xml";
            string        xmlFileName = System.Web.HttpContext.Current.Server.MapPath(filePath);
            List <string> resList     = apisaleorder.SendXmlOrder(orderDto, xmlFileName, "");
            #endregion

            string jg = resList[0].ToString().ToString() == "1" ? "导入NC成功" : GetNCError(resList);
            result = "单据号:" + txtConNo.Text + ",结果:" + jg;

            WebMsg.MessageBox(result);
        }
Beispiel #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"];
         if (vUser != null)
         {
             try
             {
                 txtzdrq.Text  = DateTime.Now.ToString("yyyy-MM-dd");
                 ltlempid.Text = vUser.Id;
                 initCK();
             }
             catch (Exception ex)
             {
                 WebMsg.MessageBox(ex.Message);
             }
         }
         else
         {
             WebMsg.CheckUserLogin();
         }
     }
 }
Beispiel #29
0
        protected void rptList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            HtmlInputCheckBox chkOrder  = (HtmlInputCheckBox)e.Item.FindControl("chkOrder");
            Literal           ltldlxwgt = (Literal)e.Item.FindControl("ltldlxwgt"); //订单待履行量
            Literal           ltlztwgt  = (Literal)e.Item.FindControl("ltlztwgt");  //订单发运在途量
            Literal           ltlyfywgt = (Literal)e.Item.FindControl("ltlyfywgt"); //订单已履行量

            try
            {
                if (Convert.ToDecimal(ltldlxwgt.Text ?? "0") <= 0)
                {
                    chkOrder.Visible = false;
                }
                else
                {
                    chkOrder.Visible = true;
                }
            }
            catch (Exception ex)
            {
                chkOrder.Visible = false;
                WebMsg.MessageBox(ex.Message);
            }
        }
 //保存
 protected void EA_Click(object sender, EventArgs e)
 {
     try
     {
         Mod_TMC_TECH_CONSULT mod = tmc_tech_consult.GetModel(ltlID.Text);
         if (mod != null)
         {
             mod.D_PLAN_DT   = Convert.ToDateTime(Start.Value);
             mod.D_FINISH_DT = Convert.ToDateTime(End.Value);
             if (!string.IsNullOrEmpty(mod.C_EMP))
             {
                 if (!mod.C_EMP.Contains(ltlUserName.Text))
                 {
                     mod.C_EMP = mod.C_EMP + "," + ltlUserName.Text;
                 }
             }
             else
             {
                 mod.C_EMP = ltlUserName.Text;
             }
             mod.C_REAL_TIME = txtTIMECONTENT.Value;
             mod.C_RESULT    = txtRESULTCONTENT.Value;
             mod.C_LEAVE_Q   = txtQUESTCONTENT.Value;
             mod.C_REMARK2   = txtRemark.Value;
             mod.N_STATE     = 1;
             if (tmc_tech_consult.Update(mod))
             {
                 WebMsg.MessageBox("保存成功", "Consult_List.aspx");
             }
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.Message);
     }
 }