Пример #1
0
 private void b_krxh_Click(object sender, EventArgs e)
 {
     if (dg_count > 0 && dg_lskr.CurrentRow.Index < dg_count && DS_lskr != null && DS_lskr.Tables[0].Rows[dg_lskr.CurrentRow.Index]["id"].ToString() != "")
     {
         Qyddj.Qkrxh Qkrxh_new = new Qkrxh("sk", common_file.common_app.get_add, DS_lskr.Tables[0].Rows[dg_lskr.CurrentRow.Index]["krxm"].ToString(), DS_lskr.Tables[0].Rows[dg_lskr.CurrentRow.Index]["krsj"].ToString(), DS_lskr.Tables[0].Rows[dg_lskr.CurrentRow.Index]["hykh"].ToString(), DS_lskr.Tables[0].Rows[dg_lskr.CurrentRow.Index]["zjhm"].ToString());
         Qkrxh_new.Left = 150;
         Qkrxh_new.Top  = 100;
         Qkrxh_new.ShowDialog();
     }
 }
Пример #2
0
        private void dg_lskr_DoubleClick(object sender, EventArgs e)
        {
            if (dg_lskr.CurrentRow != null)
            {
                int         j_000 = 0;
                DataRowView dgr   = dg_lskr.CurrentRow.DataBoundItem as DataRowView;
                j_000 = DS_lskr.Tables[0].Rows.IndexOf(dgr.Row);

                if (dg_count > 0 && dg_lskr.CurrentRow.Index < dg_count && DS_lskr != null && DS_lskr.Tables[0].Rows[j_000]["id"].ToString() != "")
                {
                    string  s_ls    = " zjhm='" + DS_lskr.Tables[0].Rows[j_000]["zjhm"].ToString() + "' order by tssj desc";
                    DataSet DS_temp = B_Common.GetList("select * from Qtsjy", s_ls);
                    if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                    {
                        Qyddj.Qtsjy Qtsjy_new = new Qtsjy(common_file.common_app.get_add, "sk", "", "", "", "", DS_lskr.Tables[0].Rows[j_000]["krsj"].ToString(), DS_lskr.Tables[0].Rows[j_000]["zjhm"].ToString(), "", "", "", " and zjhm='" + DS_lskr.Tables[0].Rows[j_000]["zjhm"].ToString() + "'");
                        Qtsjy_new.Left   = 150;
                        Qtsjy_new.Top    = 100;
                        Qtsjy_new.cz_sel = "sel";
                        Qtsjy_new.ShowDialog();
                    }
                    s_ls    = " zjhm='" + DS_lskr.Tables[0].Rows[j_000]["zjhm"].ToString() + "' order by xhrx desc";
                    DS_temp = B_Common.GetList("select * from Qkrxh", s_ls);
                    if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                    {
                        Qyddj.Qkrxh Qkrxh_new = new Qkrxh("sk", common_file.common_app.get_add, "", "", "", DS_lskr.Tables[0].Rows[j_000]["zjhm"].ToString());
                        Qkrxh_new.Left   = 150;
                        Qkrxh_new.Top    = 100;
                        Qkrxh_new.cz_sel = "sel";
                        Qkrxh_new.ShowDialog();
                    }
                    DS_temp.Dispose();
                    if (F_ls == common_file.common_form.Qskdj_new)
                    {
                        if (F_ls.tB_hykh_bz.Text.Trim() != "" && common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否要清除当前的会员卡号?"))
                        {
                            F_ls.tB_hykh_bz.Text = DS_lskr.Tables[0].Rows[j_000]["hykh_bz"].ToString();
                        }
                        else
                        {
                            //F_ls.tB_hykh_bz.Text = DS_lskr.Tables[0].Rows[j_000]["hykh_bz"].ToString();
                        }
                        F_ls.tB_krxm.Text     = DS_lskr.Tables[0].Rows[j_000]["krxm"].ToString();
                        F_ls.tB_krgj.Text     = DS_lskr.Tables[0].Rows[j_000]["krgj"].ToString();
                        F_ls.tB_yxzj.Text     = DS_lskr.Tables[0].Rows[j_000]["yxzj"].ToString();
                        F_ls.tB_zjhm.Text     = DS_lskr.Tables[0].Rows[j_000]["zjhm"].ToString();
                        F_ls.tB_krmz.Text     = DS_lskr.Tables[0].Rows[j_000]["krmz"].ToString();
                        F_ls.cB_krxb.Text     = DS_lskr.Tables[0].Rows[j_000]["krxb"].ToString();
                        F_ls.dT_krsr.Value    = DateTime.Parse(DS_lskr.Tables[0].Rows[j_000]["krsr"].ToString());
                        F_ls.tB_krdh.Text     = DS_lskr.Tables[0].Rows[j_000]["krdh"].ToString();
                        F_ls.tB_krsj.Text     = DS_lskr.Tables[0].Rows[j_000]["krsj"].ToString();
                        F_ls.tB_krEmail.Text  = DS_lskr.Tables[0].Rows[j_000]["krEmail"].ToString();
                        F_ls.tB_krdz.Text     = DS_lskr.Tables[0].Rows[j_000]["krdz"].ToString();
                        F_ls.tB_krjg.Text     = DS_lskr.Tables[0].Rows[j_000]["krjg"].ToString();
                        F_ls.tB_krdw.Text     = DS_lskr.Tables[0].Rows[j_000]["krdw"].ToString();
                        F_ls.tB_krzy.Text     = DS_lskr.Tables[0].Rows[j_000]["krzy"].ToString();
                        F_ls.tB_cxmd.Text     = DS_lskr.Tables[0].Rows[j_000]["cxmd"].ToString();
                        F_ls.tB_qzrx.Text     = DS_lskr.Tables[0].Rows[j_000]["qzrx"].ToString();
                        F_ls.tB_qzhm.Text     = DS_lskr.Tables[0].Rows[j_000]["qzhm"].ToString();
                        F_ls.dT_zjyxq.Value   = DateTime.Parse(DS_lskr.Tables[0].Rows[j_000]["zjyxq"].ToString());
                        F_ls.dT_tlyxq.Value   = DateTime.Parse(DS_lskr.Tables[0].Rows[j_000]["tlyxq"].ToString());
                        F_ls.dT_tjrq.Value    = DateTime.Parse(DS_lskr.Tables[0].Rows[j_000]["tjrq"].ToString());
                        F_ls.tB_lzka.Text     = DS_lskr.Tables[0].Rows[j_000]["lzka"].ToString();
                        F_ls.tB_vip_type.Text = DS_lskr.Tables[0].Rows[j_000]["vip_type"].ToString();
                        F_ls.tB_krrx.Text     = common_file.common_app.krrx_htk;
                        F_ls.tB_krly.Focus();
                    }
                    Close();
                }
            }
        }