Exemplo n.º 1
0
        private void Printinfo()
        {
            Label MsgShowIinfo = Skincss.AddLable(Lis, "\n\r维修报告:\n\r" + Dg.SelectedRows[0].Cells["过程信息"].Value.ToString(), "top", "0/56", "#050050050", 10, "", 3);

            MsgShowIinfo.Click += MsgShowIinfo_Click;


            //打印快递信息
            string kdinfo = Dg.SelectedRows[0].Cells["快递信息"].Value.ToString();
            string upinfo = string.Empty;

            if (Ifun.IndexOf(kdinfo, "@"))
            {
                string[] Fn = kdinfo.Split('@');

                for (int i = 0; i < Fn.Length; i++)
                {
                    upinfo += Fn[i] + "\n\r";
                }
            }
            else
            {
                if (upinfo == "")
                {
                    upinfo = "无信息记录";
                }
                else
                {
                    upinfo = kdinfo;
                }
            }
            Label CgMsgShowIinfo = Skincss.AddLable(Lis, "\n\r快递信息:\n\r" + upinfo, "top", "0/56", "#050050050", 10, "", 3);

            CgMsgShowIinfo.Click += MsgShowIinfo_Click;
        }
Exemplo n.º 2
0
        private void SetCheckBox(List <string> Dalist)
        {
            Control Pc = BFrom._MainPanel.Controls[0].Controls[0];

            foreach (CheckBox hb in Pc.Controls)
            {
                hb.Checked = false;
            }
            if (Dalist.Count > 0 && Dalist[0].Trim() != "")
            {
                string str = Dalist[0];

                //判断是否是数组
                if (Ifun.IndexOf(str, ","))
                {
                    string[] ctr = str.Split(',');
                    for (int i = 0; i < ctr.Count(); i++)
                    {
                        (Pc.Controls[ctr[i].Trim()] as CheckBox).Checked = true;
                    }
                }
                else
                {
                    (Pc.Controls[str.Trim()] as CheckBox).Checked = true;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 接收或是处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Bbt_Click(object sender, EventArgs e)
        {
            Label bt = sender as Label;

            if (Sx == "接收")
            {
                bt.Enabled = false;
                BILLnouse2 bi = new BILLnouse2();
                bi.FREENUM5 = 1;
                bi.Updata(" and id=" + id);
                //mc.Update接收维修信息(id);
                string getcode = IData.GetCode("m_rukuku", "NB");

                m_rukuku Mr = new m_rukuku
                {
                    CODE = getcode,
                    关联ID = id,
                    关联号  = (string)Ifun.IsDBnull(Dg.SelectedRows[0].Cells["code"].Value.ToString(), ""),
                    维修单  = Dg.SelectedRows[0].Cells["paytype"].Value.ToString(),
                    录单人  = UserInfo.UName,
                    录单时间 = SysTime.GetTime,
                    借用类型 = Ifun.IsDBnull(Dg.SelectedRows[0].Cells["freestr7"].Value.ToString(), "无借用").ToString(),
                    编号   = Dg.SelectedRows[0].Cells["materialCODE"].Value.ToString(),
                    物料   = Dg.SelectedRows[0].Cells["materialNAME"].Value.ToString(),
                    物料型号 = Dg.SelectedRows[0].Cells["specs"].Value.ToString(),
                    单位   = Dg.SelectedRows[0].Cells["UNITNAME"].Value.ToString(),
                    质保   = WXB,
                    数量   = decimal.Parse(Dg.SelectedRows[0].Cells["QUANTITY"].Value.ToString()),
                    仓库   = "维修库",
                    客户   = KF,
                    机床码  = JC,
                    维修人  = WXM
                };
                Mr.Insert();
                Dg.Rows.RemoveAt(Dg.SelectedRows[0].Index);
            }
            if (Sx == "评判")
            {
                decimal A = decimal.Parse(Dg.SelectedRows[0].Cells["数量"].Value.ToString());
                decimal B = Dg.SelectedRows[0].Cells["已处理"].Value.ToString() == "" ? 0 : decimal.Parse(Dg.SelectedRows[0].Cells["已处理"].Value.ToString());
                if (A - B > 0)
                {
                    num = A - B;
                    旧件处理 Js = new 旧件处理(id, num, KF);
                    if (Js.doBack)
                    {
                        Lb1_Click(null, null);
                    }
                }
                else
                {
                    Msg err = new Msg(3, "单据数量已处理完!");
                }
            }
        }
Exemplo n.º 4
0
        private void GetWxinfo(IEnumerable <string> Plist)
        {
            string mm = string.Empty;

            foreach (var c in Plist)
            {
                mm += "'" + c + "',";
            }
            if (mm == string.Empty)
            {
                return;
            }
            mm = Ifun.Left(mm, mm.Length - 1);
            clientservice_AfterServiceBill cab = new clientservice_AfterServiceBill();

            Wxinfo = cab.Select(" and code in (" + mm + ")");
        }
Exemplo n.º 5
0
        private void Ad_Click(object sender, EventArgs e)
        {
            if (Uiname == "" || Uiname is null || Tiname == "" || Tiname is null)
            {
                return;
            }

            string Miname = string.Empty;

            if (Mlist.Count <= 0)
            {
                Miname = "";
            }
            else
            {
                for (int i = 0; i < Mlist.Count; i++)
                {
                    Miname += Mlist[i] + ",";
                }
                Miname = Ifun.Left(Miname, Miname.Length - 1);
            }

            m_menu_list        mml = new m_menu_list();
            List <m_menu_list> ms  = mml.Select("and tname='" + Tiname + "' and uname='" + Uiname + "'");

            mml.Reset_m_menu_list();
            mml.UNAME = Uiname;
            mml.TNAME = Tiname;
            mml.MNAME = Miname;
            if (ms.Count > 0)
            {
                mml.Updata("and tname='" + Tiname + "' and uname='" + Uiname + "'");
            }
            else
            {
                mml.Insert();
            }

            Msg err = new Msg(3, "保存成功!");
        }
Exemplo n.º 6
0
        private void Lb4_Click(object sender, EventArgs e)
        {
            SetButton(lb4, "实施");
            m_rukukuinfo mr  = new m_rukukuinfo();
            string       sql = "and isnull(is完成,0)=0";

            if (UserInfo.UName != "lxd" && UserInfo.UName != "郑昌仁" && UserInfo.UName != "连查柳")
            {
                sql += " and 责任人='" + UserInfo.UName + "'";
            }
            List <m_rukukuinfo> lmr = mr.Select(sql);
            var m = from r in lmr select r.维修单;

            Dg.数据表名称 = "BILLnouse2_内部维修_实施";
            Dg.ShowList(lmr);
            GetWxinfo(m);
            List <string> tim = new List <string>
            {
                "开始维修时间",
                "结束完成时间"
            };

            Ifun.重置Dgv时间(Dg, tim);
        }
Exemplo n.º 7
0
 private void Lld_Click(object sender, EventArgs e)
 {
     DataTable dt = Ifun.GetDgvToTable(Mt, true, true);
     明细显示      m  = new 明细显示(id, Kf, Iscode, dt, ReadData);
 }
Exemplo n.º 8
0
 private void MakeSay_Click(object sender, EventArgs e)
 {
     string inp   = (sender as Label).Text;
     Msg    Minfo = new Msg(0, Ifun.Right(inp, inp.Length - 7), Ifun.Right(Ifun.Left(inp, 6), 4), 1);
 }
Exemplo n.º 9
0
        private void Btn_Click(object sender, EventArgs e)
        {
            Label btnn = sender as Label;

            if (btnn.Text == "取消")
            {
                doBack = false;
                Close();
            }
            if (Jhtime.Text == "")
            {
                Msg Er = new Msg(3, "请选择(要求完成时间)");
                return;
            }
            if (Tbinfo.Text == "")
            {
                Msg Er = new Msg(3, "请输入(处理依据)");
                return;
            }

            if (Wxman == "")
            {
                Msg Er = new Msg(3, "请选择(责任人)");
                return;
            }

            btnn.Text    = "正在保存数据中...";
            btnn.Enabled = false;

            //拆单逻辑
            for (int i = 1; i <= num; i++)
            {
                //保存逻辑
                m_rukukuinfo minfo = new m_rukukuinfo
                {
                    FID  = id,
                    物料   = Dt[0].物料,
                    物料型号 = Ifun.IsDBnull(Dt[0].物料型号, " ").ToString(),
                    编号   = Dt[0].编号,
                    单位   = Dt[0].单位,
                    借用类型 = Ifun.IsDBnull(Dt[0].借用类型, "无借用").ToString(),
                    维修类型 = typ,
                    预警时间 = DateTime.Parse(Jhtime.Text),
                    责任部门 = Ctyp,
                    责任人  = Wxman,
                    处罚部门 = CfBmn,
                    处罚人  = Cfmen,
                    判断时间 = SysTime.GetTime,
                    处理意见 = Tbinfo.Text.Trim(),
                    数量   = 1,
                    维修单  = Dt[0].维修单,
                    IS完成 = isWc,
                    要求时间 = Wxtime,
                };

                if (typ == "报废" || typ == "合格")
                {
                    minfo.终判类型 = typ;
                    minfo.过程信息 = Tbinfo.Text.Trim();
                }
                minfo.Insert();
            }


            doBack = true;
            //更新原数据条
            m_rukuku mr = new m_rukuku
            {
                已处理 = Dt[0].已处理 + num
            };

            mr.Updata("and id=" + id);
            Close();
        }
Exemplo n.º 10
0
 private void MsgShowIinfo_Click(object sender, EventArgs e)
 {
     // ----\n\r 是做为一个字节
     string inp   = (sender as Label).Text;
     Msg    Minfo = new Msg(0, Ifun.Right(inp, inp.Length - 7), Ifun.Right(Ifun.Left(inp, 6), 4), 1);
 }
Exemplo n.º 11
0
        private void Dg_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < -1)
            {
                return;
            }
            string Wxname = "维修单";

            Lis.Controls.Clear();
            this.SuspendLayout();
            id = int.Parse(Dg.SelectedRows[0].Cells["id"].Value.ToString());
            if (Wxinfo.Count < 0)
            {
                // mc.SetLabel(Lis, "无法读取数据!", true);
            }
            else
            {
                Label tmep = Skincss.AddLable(Lis, " ", "top", "0/40");
                if (Sx == "历史")
                {
                    Label Bmx = Skincss.AddLable(tmep, "查看分配明细", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                    Bmx.Click += Bmx_Click;
                }
                if (Sx == "接收")
                {
                    Wxname = "paytype";
                    Label Bbt = Skincss.AddLable(tmep, Sx, "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                    Bbt.Click += Bbt_Click;
                }
                if (Sx == "评判")
                {
                    Label Bbt = Skincss.AddLable(tmep, "物料初步评判", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                    Bbt.Click += Bbt_Click;
                }
                if (Sx == "审核")
                {
                    Label pctmep = Skincss.AddLable(Lis, " ", "top", "0/40");
                    //  Label CNMX = Skincss.AddLable(pctmep, "提交总经办审批", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                    Label Bbt = Skincss.AddLable(tmep, "审核", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                    Bbt.Click += Bbt_Click6;
                    Printinfo();
                }
                if (Sx == "实施")
                {
                    //一步步读取 下一步

                    if (Dg.SelectedRows[0].Cells["接收人"].Value.ToString() == "")
                    {
                        Label Bbt = Skincss.AddLable(tmep, "接收维修单", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                        Bbt.Click += Bbt_Click1;
                    }
                    else if (DateTime.Parse(Dg.SelectedRows[0].Cells["开始维修时间"].Value.ToString()) == DateTime.MinValue)
                    {
                        Label Bbt = Skincss.AddLable(tmep, "开始维修", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                        Bbt.Click += Bbt_Click2;
                    }
                    else if (DateTime.Parse(Dg.SelectedRows[0].Cells["结束完成时间"].Value.ToString()) == DateTime.MinValue)
                    {
                        Label Bbt = Skincss.AddLable(tmep, "完成维修", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                        Bbt.Click += Bbt_Click3;
                    }
                    else
                    {
                        快递和反馈信息(tmep);
                    }
                }
                if (Sx == "客户")
                {
                    Printinfo();
                    Label Bbt = Skincss.AddLable(tmep, "物料判定", "10/0", (tmep.Width - 20) + "/30", "#255255255", 12, "", 1, -1, false, "#030164045");
                    Bbt.Click += Bbt_Click7;
                }

                //-----------------------
                //基础显示模块
                //-----------------------

                List <clientservice_AfterServiceBill> Tm = Wxinfo.Where(x => x.CODE == Dg.SelectedRows[0].Cells[Wxname].Value.ToString()).ToList();
                KF  = Tm[0].CLIENT.ToString();
                JC  = Tm[0].ZF1.ToString();
                WXM = Tm[0].BILLMAN.ToString();
                WXB = Tm[0].BILLTYPE.ToString();

                Label Pdinfo = Skincss.AddLable(Lis, "\n\r维修判断:\n\r" + Ifun.IsDBnull(Tm[0].ZF5, "无记录"), "top", "0/56", "#050050050", 10, "", 3);
                Pdinfo.Click += MsgShowIinfo_Click;
                tmep          = Skincss.AddLable(Lis, "维修员:" + WXM, "top", "0/35", "#050050050");
                tmep          = Skincss.AddLable(Lis, "机床码:" + JC, "top", "0/35", "#050050050");
                tmep          = Skincss.AddLable(Lis, "类型:" + WXB, "top", "0/35", "#050050050");
                tmep          = Skincss.AddLable(Lis, "客户:" + KF, "top", "0/35", "#050050050");

                tmep = Skincss.AddLable(Lis, "维修单信息", "top", "0/30", "#255255255", 12, "", 1, -1, false, Skin.upBColor);
                this.ResumeLayout(false);
            }
        }