public DateTime get_thoi_diem_can_hoan_thanh(string time)
 {
     string v_output = "";
     CStoredProc v_cstore = new CStoredProc("pr_get_thoi_diem_can_hoan_thanh");
      v_cstore.addNVarcharInputParam("@string_time", time);
      SqlParameter v_result = v_cstore.addDatetimeOutputParam("@thoi_diem_can_hoan_thanh", v_output);
     v_cstore.ExecuteCommand(this);
     return (DateTime)v_result.Value;
 }
        public void get_co_so_dinh_muc_ap_dung_tu_ngay(decimal ip_id_trung_tam, decimal ip_id_loai_dinh_muc
            , DateTime ip_from_date, DateTime ip_to_date
            , ref decimal op_id_co_so_dinh_muc, ref DateTime op_ap_dung_tu_ngay
            , ref string op_ten_co_so_dinh_muc)
        {
            CStoredProc v_proc = new CStoredProc("pr_get_co_so_dinh_muc_ap_dung_tu_ngay");

            v_proc.addDecimalInputParam("@ID_TRUNG_TAM", ip_id_trung_tam);
            v_proc.addDecimalInputParam("@ID_LOAI_DINH_MUC", ip_id_loai_dinh_muc);
            v_proc.addDatetimeInputParam("@FROM_DATE", ip_from_date);
            v_proc.addDatetimeInputParam("@TO_DATE", ip_to_date);

            SqlParameter v_obj_id_co_so_dinh_muc = v_proc.addDecimalOutputParam("@ID_CO_SO_DINH_MUC", -1);
            SqlParameter v_obj_ten_co_so_dinh_muc = v_proc.addNVarcharOutputParam("@TEN_CO_SO_DINH_MUC", -1);
            SqlParameter v_obj_ap_dung_tu_ngay = v_proc.addDatetimeOutputParam("@AP_DUNG_TU_NGAY", -1);

            v_proc.ExecuteCommand(this);

            op_id_co_so_dinh_muc = CIPConvert.ToDecimal(v_obj_id_co_so_dinh_muc.Value);
            string temp = v_obj_ap_dung_tu_ngay.Value.ToString();
            if(temp != "") {
            temp = temp.Substring(0, temp.IndexOf(" "));
            op_ap_dung_tu_ngay = CIPConvert.ToDatetime(temp);
            }
            if(v_obj_ten_co_so_dinh_muc.Value.ToString() != "") {
            op_ten_co_so_dinh_muc = CIPConvert.ToStr(v_obj_ten_co_so_dinh_muc.Value);
            }
        }
예제 #3
0
        public string get_ap_dung_tu_ngay(decimal ip_id_loai_dinh_muc, decimal ip_id_loai_co_so_dinh_muc)
        {
            CStoredProc v_proc = new CStoredProc("pr_get_ap_dung_tu_ngay_max");
            v_proc.addDecimalInputParam("@ID_LOAI_DINH_MUC", ip_id_loai_dinh_muc);
            v_proc.addDecimalInputParam("@ID_LOAI_CO_SO_DINH_MUC", ip_id_loai_co_so_dinh_muc);
            SqlParameter v_ap_dung_tu_ngay = v_proc.addDatetimeOutputParam("@AP_DUNG_TU_NGAY", -1);
            v_proc.ExecuteCommand(this);

            return v_ap_dung_tu_ngay.Value.ToString();
        }