Aside from surgery is there other medical treatment for stye and chalzion. Because my eye inflammation last for 3 months and did'nt cure when putting ointment. And I am so scared to have a surgery, is there other medical treatment for chalzion or stye

Warm. Warm commpresses and lid massage can help, but the use of a tetracycline antibiotic can sometimes help as well--talk to your ophthamologist about this. If you do need to have it excised, your doctor will completely numb it first and it is usually done from the inner side of the lid--you should not feel a thing and there will be no visible scar.
Ointments. Ointments sometimes block pores further, slowing down healing of styles. Ask your doctor to switch you ro an eyes drop that combines antibiotic and steroids, and do 3 five-minute hot compresse each day. Recent studies have also shown success using steroid injection into the stye instead of or with surgery. If all else fails, the surgery is very minor, done in the office, and takes less than 5 minutes. Extremely low risk, and very successful.
Yes! . Yes! The treatment of choice for both stye and chalazion is warm compress. If done properly it will cure most all cases. The key here is performing the compress properly. The idea is to dilate the blood vessels around the stye. This will in turn bring about white blood cells that will fight the infection (in case of a stye) and clean up the debris (the nodule seen with both stye and chalazion). The warm compress should be for about one hour per day for 2 to 3 weeks. I recommend using a potato and microwaving it for 4 minutes and then wrapping it in a warm wet hand towel. This will allow ~15 min of warmth that you can apply to the stye. So you will have to repeat this several times. Most doctors will tell you to perform warm compress but forget to tell you how to do it. Often, a doctor will inject steroid into a stye or a chalazion but I have never seen this to work. Antibiotic is to control the infection portion of a stye but will not remove a stye or a chalazion.