How to Use Codebuider 2

Source: Internet
Author: User

Check the Code:
Generated Stored Procedure

Sp_Flow_GetDocumentStatusByStaff # region sp_Flow_GetDocumentStatusByStaff
Pulic void Exec_sp_Flow_GetDocumentStatusByStaff (int staff_id, int docid ,)
{
DataBase db = new DataBase ();
DataTable dt = null;
IDbDataParameter [] para = {
Db. MakeInParam ("@ staff_id", Int32, staff_id ),
Db. MakeInParam ("@ DocID", Int32, DocID ),
}
Try
{
Dt = db. SpExecuteDataTable ("sp_Flow_GetDocumentStatusByStaff", para );
}
Catch (System. Exception ex)
{
Dt = null;
Throw new Exception ("an error occurred! ", Ex );
}
Return dt;
}
# Endregion

There are a lot of problems with this generation, and it will be known to be wrong when you look at the code, but it can take out the parameters in the stored procedure, and you can make necessary modifications when writing; dataBase is my encapsulated class, which is downloaded by me.

Here are some assignment operations: // *********************************** value assignment 1 **************************************
Employee1.Staff _ Name = this.txt _ Staff_Name.Text.Trim ();
Employee1.Password = this.txt _ Password. Text. Trim ();
Employee1.RealName = this.txt _ RealName. Text. Trim ();
Employee1.Sex = this.txt _ Sex. Text. Trim ();
Employee1.Email = this.txt _ Email. Text. Trim ();
Employee1.Status = this.txt _ Status. Text. Trim ();
Employee1.RegistedDate = this.txt _ RegistedDate. Text. Trim ();
Employee1.Dimission = this.txt _ Dimission. Text. Trim ();
Employee1.Phone = this.txt _ Phone. Text. Trim ();
Employee1.Mobile = this.txt _ Mobile. Text. Trim ();
Employee1.Birthday = this.txt _ Birthday. Text. Trim ();
Employee1.Style = this.txt _ Style. Text. Trim ();
Employee1.IsNeedKey = this.txt _ IsNeedKey. Text. Trim ();
Employee1.Caste = this.txt _ Caste. Text. Trim ();
Employee1.PostionID = this.txt _ PostionID. Text. Trim ();
// *********************************** Value assignment 1 ************************************
// *********************************** Value assignment 2 ************************************
This.txt _ Staff_Name.Text = employee1.Staff _ Name;
This.txt _ Password. Text = employee1.Password;
This.txt _ RealName. Text = employee1.RealName;
This.txt _ Sex. Text = employee1.Sex;
This.txt _ Email. Text = employee1.Email;
This.txt _ Status. Text = employee1.Status;
This.txt _ RegistedDate. Text = employee1.RegistedDate;
This.txt _ Dimission. Text = employee1.Dimission;
This.txt _ Phone. Text = employee1.Phone;
This.txt _ Mobile. Text = employee1.Mobile;
This.txt _ Birthday. Text = employee1.Birthday;
This.txt _ Style. Text = employee1.Style;
This.txt _ IsNeedKey. Text = employee1.IsNeedKey;
This.txt _ Caste. Text = employee1.Caste;
This.txt _ PostionID. Text = employee1.PostionID;
// *********************************** Value assignment 2 **************************************

This code is used to be lazy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.