Exemple #1
0
        private void btn_dele_Click(object sender, EventArgs e)
        {
            string   workno;
            DateTime tempdate;

            if (!grd_data.has_selectrow())
            {
                MessageBox.Show("请先选择一条 转出 记录");
                return;
            }

            if (grd_data.get_value(1).ToString().IndexOf("转出") < 0)
            {
                MessageBox.Show("请先选择一条 转出 记录");
                return;
            }

            forms.frm_删除转出 frm   = new frm_删除转出();
            转出类DAL         mycls = new 转出类DAL();


            if (frm.show_window() == true)
            {
                string temp_date;

                temp_date = grd_data.get_value(1).ToString();
                //mycls.dele_date(grd_data.get_value(0).ToString(), new DateTime(int.Parse(temp_date.Substring(0, 4)), int.Parse(temp_date.Substring(5, 2)), 15), deptcode);

                tempdate = new DateTime(int.Parse(temp_date.Substring(0, 4)), int.Parse(temp_date.Substring(5, 2)), 15);
                workno   = grd_data.get_value(0).ToString();

                转出类DAL dal = new 转出类DAL();



                dal.del_data(workno, tempdate, deptcode);



                //mycls.dele_date(grd_data.get_value(0).ToString(), new DateTime(int.Parse(tempdate.Substring(0, 4)), int.Parse(tempdate.Substring(5, 2)), 15));
                //button1_Click(sender, e);
            }
        }
Exemple #2
0
        private void frm_单个工号转出_Load(object sender, EventArgs e)
        {
            checkBox1.Checked = true;
            txt_factor.set_title("比例系数:");
            txt_factor.set_type(2);
            txt_ztsl.set_title("铸铁数量:");
            txt_ztsl.set_type(2);
            txt_ztje.set_title("铸铁金额:");
            txt_ztje.set_type(2);
            txt_blje.set_title("备件金额:");
            txt_blje.set_type(2);
            txt_bzje.set_title("标准件:");
            txt_bzje.set_type(2);
            txt_djje.set_title("锻件金额");
            txt_djje.set_type(2);
            txt_djsl.set_title("锻件数量");
            txt_djsl.set_type(2);
            txt_mhje.set_title("铆焊金额");
            txt_mhje.set_type(2);
            txt_ptje.set_title("配套金额");
            txt_ptje.set_type(2);
            txt_clxje.set_title("齿轮配套");
            txt_clxje.set_type(2);
            txt_syje.set_title("水压金额");
            txt_syje.set_type(2);
            txt_sysl.set_title("水压数量");
            txt_sysl.set_type(2);
            txt_wgje.set_title("外购金额");
            txt_wgje.set_type(2);
            txt_ysje.set_title("有色金额");
            txt_ysje.set_type(2);
            txt_yssl.set_title("有色数量");
            txt_yssl.set_type(2);
            txt_zgje.set_title("铸钢金额");
            txt_zgje.set_type(2);
            txt_zgsl.set_title("铸钢数量");
            txt_zgsl.set_type(2);
            txt_sjf.set_title("设计费");
            txt_sjf.set_type(2);
            txt_ysf.set_title("运输费");
            txt_ysf.set_type(2);
            txt_xsptj.set_title("销售配套件");
            txt_xsptj.set_type(2);


            txt_rldl.set_title("燃料动力");
            txt_rldl.set_type(2);
            txt_gzfl.set_title("工资福利");
            txt_gzfl.set_type(2);
            txt_gs.set_title("工时");
            txt_gs.set_type(2);
            txt_zhgs.set_title("折合工时");
            txt_zhgs.set_type(2);
            txt_zzfy.set_title("制造费用");
            txt_zzfy.set_type(2);
            txt_zxfy.set_title("专项费用");
            txt_zxfy.set_type(2);
            txt_wjgf.set_title("外加工费");
            txt_wjgf.set_type(2);
            txt_rclf.set_title("热处理费");
            txt_rclf.set_type(2);
            txt_bzf.set_title("包装费");
            txt_bzf.set_type(2);

            label3.Text = workno;
            Text        = " 完工工号转出    部门:" + deptname;



            转出类DAL dal = new 转出类DAL();

            if (addflag)
            {
                mycls        = dal.getOutInfoByWorkno(workno, mydate, deptcode);
                button1.Text = "转出";
            }
            else
            {
                mycls        = dal.getUpdateInfoByWorkno(workno, mydate, deptcode);
                button1.Text = "修改";
            }

            groupBox3.Enabled = false;
            set_txtbox(mycls);

            set_txt_enabled(false);

            saveflag = false;
        }
Exemple #3
0
        private void dele_date(string workno, DateTime mydate, int deptcode)
        {
            转出类DAL dal = new 转出类DAL();

            dal.del_data(workno, mydate, deptcode);
        }