Пример #1
0
        public Stage_M getStageMData()
        {
            Stage_M stage_m = new Stage_M();

            stage_m.Stage_Type         = cmb_stage_basis.Text;
            stage_m.Stage_m_name       = txt_box_stage_name.Text;
            stage_m.Stage_m_desc       = txt_box_stage_desc.Text;
            stage_m.Stage_m_disease_id = "N/A";

            return(stage_m);
        }
Пример #2
0
        public static void Insert(Stage_M stage_m)
        {
            SqlParameter[] param = new SqlParameter[5];

            param[0]           = new SqlParameter("@stage_m_id", SqlDbType.NVarChar, 15);
            param[0].Direction = ParameterDirection.Output;
            param[1]           = new SqlParameter("@stage_m_name", stage_m.Stage_m_name);
            param[2]           = new SqlParameter("@stage_m_desc", stage_m.Stage_m_desc);
            param[3]           = new SqlParameter("@stage_m_disease_id", stage_m.Stage_m_disease_id);
            param[4]           = new SqlParameter("@stage_type", stage_m.Stage_Type);


            try
            {
                stage_m.Stage_m_id = DBHelper.ExecuteReturnIDStoredProcedure("insert_stage_m", param);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }