예제 #1
0
        //新增
        private void ToolStripMenuItemCreate_Click(object sender, EventArgs e)
        {
            CreateClientForm ccf = new CreateClientForm();

            ccf.ShowDialog(this);
            closeDispose();
        }
예제 #2
0
 //编辑
 private void ToolStripMenuItemEdit_Click(object sender, EventArgs e)
 {
     if (superGridControlClient.GetSelectedRows().Count > 0)
     {
         Client client = new Client();
         SelectedElementCollection col = superGridControlClient.GetSelectedRows();
         if (col.Count > 0)
         {
             GridRow gridRow = col[0] as GridRow;
             client.Cli_ID             = Convert.ToInt32(gridRow.Cells["gridColumnID"].Value);
             client.Cli_Code           = gridRow.Cells["gridColumnCode"].Value.ToString();
             client.Cli_zhiwen         = gridRow.Cells["gridColumnZ"].Value.ToString();
             client.Cli_Name           = gridRow.Cells["gridColumnCliName"].Value.ToString();
             client.Cli_LinkMan        = gridRow.Cells["gridColumnMan"].Value.ToString();
             client.Cli_Company        = gridRow.Cells["gridColumnCo"].Value.ToString();
             client.Cli_Phone          = gridRow.Cells["gridColumnPho"].Value.ToString();
             client.Cli_PhoneTwo       = gridRow.Cells["gridColumnPho2"].Value.ToString();
             client.Cli_faxes          = gridRow.Cells["gridColumnFax"].Value.ToString();
             client.Cli_CityCode       = gridRow.Cells["gridColumnCiCode"].Value.ToString();
             client.Cli_area           = gridRow.Cells["gridColumnArea"].Value.ToString();
             client.Cli_Address        = gridRow.Cells["gridColumnAd"].Value.ToString();
             client.Cli_TypeCode       = gridRow.Cells["gridColumnTy"].Value.ToString();
             client.Cli_TypeName       = gridRow.Cells["gridColumnTyName"].Value.ToString();
             client.Cli_DiscountCode   = gridRow.Cells["gridColumnDiCode"].Value.ToString();
             client.Cli_Bankaccounts   = gridRow.Cells["gridColumnBa"].Value.ToString();
             client.Cli_OpenBank       = gridRow.Cells["gridColumnOpB"].Value.ToString();
             client.Cli_Olddata        = null;
             client.Cli_Oldreturn      = null;
             client.Cli_Newoutdata     = null;
             client.Cli_Newintodata    = null;
             client.Cli_Createdata     = Convert.ToDateTime(gridRow.Cells["gridColumnCre"].Value);
             client.Cli_Limit          = gridRow.Cells["gridColumnLim"].Value.ToString();
             client.Cli_RemainLimit    = gridRow.Cells["gridColumnReLim"].Value.ToString();
             client.Cli_ClearLimitdate = gridRow.Cells["gridColumnDay"].Value.ToString();
             client.Cli_ShouldMoney    = gridRow.Cells["gridColumnSho"].Value.ToString();
             client.Cli_GetMoney       = gridRow.Cells["gridColumnGet"].Value.ToString();
             client.Cli_PreMoney       = gridRow.Cells["gridColumnPre"].Value.ToString();
             client.Cli_Remark         = gridRow.Cells["gridColumnRem"].Value.ToString();
             client.Cli_safetone       = gridRow.Cells["gridColumnsafetone"].Value.ToString();
             client.Cli_safettwo       = gridRow.Cells["gridColumnsafettwo"].Value.ToString();
             client.Cli_Enable         = Convert.ToInt32(gridRow.Cells["gridColumnEnable"].Value);
             client.Cli_PicName        = gridRow.Cells["gridColumnPic"].Value.ToString();
         }
         CreateClientForm ccf = new CreateClientForm();
         ccf.Client = client;
         ccf.ShowDialog(this);
         closeDispose();
     }
     else
     {
         MessageBox.Show("请选择要修改的行");
     }
 }